Hi everyone,
I am very new to VBA , basically this is what I am trying to achieve:
I am trying to locate and loop through the data with a sepefic month.
Now with the find function, i can locate the column with the for the month header. How can I find the "real range" I need from the next row onwards till the last row.
For example , with below, current find.address function will be at A3, the column I will need to look for will be A4 ( A3+1) till the last column of A with data.
any input will be appreciated. Thanks
Sub test()
Dim locatem As Range
Dim Frequency As Range
Dim currentmonth1 As String
Set ws = Worksheets("Current KIs")
currentmonth1 = Sheets("Instruction").Range("B6").Value
With ws.Range("3:3")
Set locatem = .Find(currentmonth1, LookIn:=xlValues)
End With
End Sub
I am very new to VBA , basically this is what I am trying to achieve:
I am trying to locate and loop through the data with a sepefic month.
Now with the find function, i can locate the column with the for the month header. How can I find the "real range" I need from the next row onwards till the last row.
For example , with below, current find.address function will be at A3, the column I will need to look for will be A4 ( A3+1) till the last column of A with data.
any input will be appreciated. Thanks
Sub test()
Dim locatem As Range
Dim Frequency As Range
Dim currentmonth1 As String
Set ws = Worksheets("Current KIs")
currentmonth1 = Sheets("Instruction").Range("B6").Value
With ws.Range("3:3")
Set locatem = .Find(currentmonth1, LookIn:=xlValues)
End With
End Sub