View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Macro instead of lookup

set c = Rows(1).find(what:="abc",lookin:=xlvalues,lookat:= xlwhole)

then test fo c
if c is nothing then
msgbox("count not find abc")
else
msgbox("data found in column " & c.column)
end if

"Kashyap" wrote:

How to make a macro which works same as hlookup?

Eg: I have some data in a different file and I need to get those to active
sheet. if value in range a1:z1 matches a1.value in active sheet then it
should get value from corresponing cloumn