Уставка поиска возвращает объект диапазона, но код
netAmount = foundsomething.Address.Offset(0, 1).Value
возвращает «недопустимый квалификатор» для «Адреса», но «foundsomething» является объектом диапазона, поэтому он должен иметь адрес?
Sub getMonthlyNet(ws As Worksheet)
Dim netAmount As Long
Dim month(1 To 12) As String
Dim foundsomething As Range
Dim searchterm As String
month(1) = "january"
month(2) = "febuaray"
month(3) = "march"
month(4) = "april"
month(5) = "may"
month(6) = "june"
month(7) = "july"
month(8) = "august"
month(9) = "september"
month(10) = "october"
month(11) = "november"
month(12) = "december"
For i = 1 To 12
searchterm = month(i)
Set foundsomething = Application.ws.Find(What:="search term", After:=Range("V1"), LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)
If (Not foundsomething Is Nothing) Then
netAmount = foundsomething.Address.Offset(0, 1).Value
Cells(i, 1).Value = foundsomething
Cells(i, 2).Value = netAmount
End If
Next