Hello,
I'm trying to convert a work sheet formula to VBA.
I enter a new job in a user form, when I hit continue and info transfers to "Data" sheet I want code to run and update.
Sub Vessel_Details_WorksheetChange()
'my formula on worksheet =INDEX('Wharf Schedules'!B:B,MATCH(Data!AO59&Data!AQ59,'Wharf Schedules'!C:C&'Wharf Schedules'!E:E,0))
With Range("AL5:AL" & Range("AO" And "AQ" & Rows.Count).End(xlUp).Row)
.Formula = "=IFERROR(INDEX('Worksheet3'!B:B,MATCH('Worksheet'!"AO" And "AQ",'Worksheet2'!C:C&'Worksheet2'!E:E,0)),"""")"
.Value = .Value
End With
End Sub
I'm trying to convert a work sheet formula to VBA.
I enter a new job in a user form, when I hit continue and info transfers to "Data" sheet I want code to run and update.
Sub Vessel_Details_WorksheetChange()
'my formula on worksheet =INDEX('Wharf Schedules'!B:B,MATCH(Data!AO59&Data!AQ59,'Wharf Schedules'!C:C&'Wharf Schedules'!E:E,0))
With Range("AL5:AL" & Range("AO" And "AQ" & Rows.Count).End(xlUp).Row)
.Formula = "=IFERROR(INDEX('Worksheet3'!B:B,MATCH('Worksheet'!"AO" And "AQ",'Worksheet2'!C:C&'Worksheet2'!E:E,0)),"""")"
.Value = .Value
End With
End Sub