I have a form using application.vlookup method.
When I search a value from the first(“A”) column it works perfect.
But when I search a value from the “D” column I it refers D column as the first column and I want all the data including the A-C columns.
I’m working on private network so I can’t share the code so I write it down I hope you can understand:
Q=application.worksheetfunction.counta(ws.range(“A”:”A”))
User=application.vlookup(clng(value)),ws.range(“D”&2,”p”&q),2,0)
By writing 2 I wanted the “B” column data but it gives me the “E” column data instead.
What can I do? Thanks
I tried to play with the numbers and writes -2 instead so it will give me two columns backwards and I get the B column data but it didn’t work.
DENI580 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.