基本情報:?Q10 そして、レンジ・を合計:(エラーが発生した)
Function Col_Letter(lngCol As Long) As String ' number to letter function
Dim vArr
vArr = Split(Cells(1, lngCol).Address(True, False), "$")
Col_Letter = vArr
End Function
'Worksheets ("button").cells(1,3).value ' with value 12
'Worksheets ("button").cells(2,3).value ' with value 15
私は、範囲L3と範囲-mandayrngを暗く使いたいですmandayrng。
Dim mandayrng as range
mandayrng = Worksheets("manday").Range(cells(Col_Letter(Worksheets ("button").cells(2,3).value),3), cells(Col_Letter(Worksheets ("button").cells(2,3).value),10))'the range is L3: Q10
With Worksheets("report")
row = worksheet.Range("C" & Rows.Count).End(xlUp).row
For k = 6 To row
Worksheets("report").Cells(i, 6) = Application.WorksheetFunction.sum(mandayrng) 'sum with the range of mandayrng
Next k
End With
ここにコードが機能していませんが。
修正方法?
あなたのコードで何を意味するかを動かない?より具体的にしてください。 –
あなたはこのビデオを見る必要があります[Excel VBAの紹介パート5 - セル(範囲、セル、アクティブセル、終了、オフセット)の選択](https://www.youtube.com/watch?v=c8reU-H1PKQ) –