呵呵,第一次寫vba,自己解決的,小小慶祝一下

2021-04-18 15:55:23 字數 2251 閱讀 1560

**出現,(*^__^*) 嘻嘻……,雖然沒有女朋友,

但程式解決了,小小慶賀一下

sub 轉換單元格()

'' macro1 macro''

dim shtsheet as worksheet

for each shtsheet in sheets

if shtsheet.name = "o3" then

for k = 2 to shtsheet.usedrange.rows.count

for i = 2 to 33

if (shtsheet.cells(k, i) = "nodata" or shtsheet.cells(2, i) = "") then

shtsheet.cells(k, i + 33) = "——"

elseif (cint(shtsheet.cells(k, i)) < 50) then

shtsheet.cells(k, i + 33) = "a1"

elseif (cint(shtsheet.cells(k, i)) >= 50) and (cint(shtsheet.cells(k, i)) < 100) then

shtsheet.cells(k, i + 33) = "a2"

elseif (cint(shtsheet.cells(k, i)) >= 100) and (cint(shtsheet.cells(k, i)) < 120) then

shtsheet.cells(k, i + 33) = "a3"

elseif (cint(shtsheet.cells(k, i)) >= 120) and (cint(shtsheet.cells(k, i)) < 160) then

shtsheet.cells(k, i + 33) = "b1"

elseif (cint(shtsheet.cells(k, i)) >= 160) and (cint(shtsheet.cells(k, i)) < 180) then

shtsheet.cells(k, i + 33) = "b2"

elseif (cint(shtsheet.cells(k, i)) >= 180) and (cint(shtsheet.cells(k, i)) < 200) then

shtsheet.cells(k, i + 33) = "b3"

elseif (cint(shtsheet.cells(k, i)) >= 200) and (cint(shtsheet.cells(k, i)) < 240) then

shtsheet.cells(k, i + 33) = "c1"

elseif (cint(shtsheet.cells(k, i)) >= 240) and (cint(shtsheet.cells(k, i)) < 300) then

shtsheet.cells(k, i + 33) = "c2"

elseif (cint(shtsheet.cells(k, i)) >= 300) and (cint(shtsheet.cells(k, i)) < 360) then

shtsheet.cells(k, i + 33) = "c3"

elseif (cint(shtsheet.cells(k, i)) >= 360) and (cint(shtsheet.cells(k, i)) < 400) then

shtsheet.cells(k, i + 33) = "c4"

elseif (cint(shtsheet.cells(k, i)) >= 400) and (cint(shtsheet.cells(k, i)) < 600) then

shtsheet.cells(k, i + 33) = "d1"

elseif (cint(shtsheet.cells(k, i)) >= 600) and (cint(shtsheet.cells(k, i)) < 800) then

shtsheet.cells(k, i + 33) = "d2"

elseif (cint(shtsheet.cells(k, i)) >= 800) then

shtsheet.cells(k, i + 33) = "e"

end if

next i

next k

end if

exit sub

next shtsheet

set shtsheet = sheets.add(before:=sheets(1))

shtsheet.name = "o3"

第一次寫Blog,呵呵

我將在這個blog上將放一點大學期間做的小專案的開發筆記。先定個大致的計畫吧 scilab的簡介 scilab aurora開發小結 用tcl tk實現scilab aurora的時間軌 ffmpeg,opencv的簡介 用ffmpeg,opencv使用開發evp scilab aurora核心演算...

素數和(第一次自己寫)

最近學翁愷老師程式設計入門 c語言 為了方便自己以後複習和整理,我邊做邊寫了這些。題目內容 我們認為2是第乙個素數,3是第二個素數,5是第三個素數,依次類推。現在,給定兩個整數n和m,0輸入格式 兩個整數,第乙個表示n,第二個表示m。輸出格式 乙個整數,表示第n個素數到第m個素數之間所有的素數的和,...

記錄自己第一次寫的快取

這是我第一次接觸到快取這乙個功能,不是寫在redis上,而是在記憶體上,利用list集合。在這次 的編寫中讓我對list集合更加的熟悉。以此記錄我的成長。repository value ordertypedetaildao public class ordertypedetaildao exten...