當前位置:編程學習大全網 - 編程軟體 - [VBA編程]怎麽向壹個單元格中寫入字符變量?

[VBA編程]怎麽向壹個單元格中寫入字符變量?

vba 引用

range("a"&i)

cells(i,j)

Sub Sheet5_按鈕1_單擊()

Rows("3:3").Select

Range(Selection, Selection.End(xlDown)).Select

Range(Selection, Selection.End(xlDown)).Select

Range(Selection, Selection.End(xlDown)).Select

Range(Selection, Selection.End(xlDown)).Select

Selection.Delete Shift:=xlUp

nowrow = 6

For i = 2 To Sheets("入庫明細").UsedRange.Rows.Count

findaaa = 0

For j = 6 To nowrow

If Sheets("月報").Range("d" & j) = Sheets("入庫明細").Range("c" & i) & "/" & Sheets("入庫明細").Range("g" & i) Then

findaaa = 1

j = 65536

End If

Next j

If findaaa = 0 Then

Sheets("月報").Range("d" & nowrow) = Sheets("入庫明細").Range("c" & i) & "/" & Sheets("入庫明細").Range("g" & i)

nowrow = nowrow + 1

End If

Next i

MsgBox nowrow

Range("D6:D" & nowrow - 1).Select

Selection.Sort Key1:=Range("D6"), Order1:=xlAscending, Header:=xlGuess, _

OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, SortMethod _

:=xlPinYin, DataOption1:=xlSortNormal

End Sub

  • 上一篇:UI設計都包括什麽?
  • 下一篇:如何看待web前端技術
  • copyright 2024編程學習大全網