Hi,
I am doing vlookup to filtered sheet using this code:
This code works well when sheet1 is filtered. But In my case Sheet2 is filtered not sheet1.
I want to do vlookup from sheet1 (Not filtered) to the sheet2 (filtered). Is there any way I can modify my code to achieve this?
Any help is appreciated.
Thank you!
I am doing vlookup to filtered sheet using this code:
VBA Code:
Sub test()
Sheets("Sheet1").Select
Range("B2:B6").SpecialCells(xlVisible).FormulaR1C1 = "=VLOOKUP(rc1,Sheet2!c1:c3,2,FALSE)"
End Sub
This code works well when sheet1 is filtered. But In my case Sheet2 is filtered not sheet1.
I want to do vlookup from sheet1 (Not filtered) to the sheet2 (filtered). Is there any way I can modify my code to achieve this?
Any help is appreciated.
Thank you!