Dear All master,
please help me continue with the vba code that I have created according to the results
I made with the formula, namely in columns E, F, G.
this is my link : MULTI VLOOKUP IN VBA.xlsm
file
and I have repair Removed Records: Sorting from /xl/worksheets/sheet2.xml part. Is there a problem with my vba sort code?. Please solution,
please help me continue with the vba code that I have created according to the results
I made with the formula, namely in columns E, F, G.
this is my link : MULTI VLOOKUP IN VBA.xlsm
file
and I have repair Removed Records: Sorting from /xl/worksheets/sheet2.xml part. Is there a problem with my vba sort code?. Please solution,
VBA Code:
Option Explicit
Sub multivlookup()
Application.ScreenUpdating = False
' sort DB sheet on col A
With Sheets("DB").Sort
.SortFields.Add Key:=Range("c1"), Order:=xlAscending
.SetRange Range("c1:f61")
.Header = xlYes
.Apply
End With
With Range(Cells(2, 5), Cells(2, 5).End(xlDown))
.FormulaR1C1 = "=IF(VLOOKUP([@DATE],dbperiod,1,true)=[@DATE],VLOOKUP([@DATE],dbperiod,4),"""")"
.Value = .Value
End With
Application.ScreenUpdating = True
End Sub