PDA

View Full Version : VBA Code - Lookup column1 in Column2



murthysri272
02-12-2016, 03:57 PM
Hi,
I working on the same case in a different way. Could you please help me with the sample VBA code for below scenario:


I have Only one sheet name (HYP).
In that I have 4 columns column1, column2, column3, Column4.

Lookup each value of column1 in Column2.

If Column1 Cell 1 is matching with Column2 Cell 4 then adjacent value in Column3 Cell 4 (corresponds to column2 cell 4) should return on column4 Cell1.



I hope you understand the scenario.


Thanks for your help.

Regards,
Sri

Aussiebear
02-12-2016, 03:59 PM
Have you tried the macro recorder to get the fundament basics for the required code?

murthysri272
02-12-2016, 04:16 PM
Hi,

I am trying below code, but its not displaying any result.

Regards,
Sri

p45cal
02-12-2016, 04:20 PM
multiposted and formula solution offered here: http://www.vbaexpress.com/forum/showthread.php?55115-VBA-CODE-Match-2-cells-and-display-the-result
For a vba solution record yourself putting the formula in the entire range, then continue recording while you copy/paste-special values.