Thread: macros
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
steveB steveB is offline
external usenet poster
 
Posts: 30
Default macros

Frank,

My bad... Meant to use WorksheetFunction.

Have been home to long and the senior moments are piling up...

Thanks for catching this. Don't want to confuse the user anymore than need
be...

--

steveB

(Remove 'NOSPAM' from email address if contacting me direct)


"Frank Kabel" wrote in message
...
Hi Steve
what is 'workbookfunction' :-)
you probably meant
Range("A1").value =
application.VLookUP(Range("A2").value,Range("M1:P5 "),2,0)

(also clearing some typos and adding the 4th parameter to vlookup)


--
Regards
Frank Kabel
Frankfurt, Germany


steveB wrote:
Range("A1") = Workbookfunction(VLookUP(Range("A2",Range("M1:P5") ,2))

Just substitute the cell and range settings.
You may want to use

Range("A1").Value=.............

hth

"hey" wrote in message
...
I would like to see the writing for a macro that looks up a value in
a

table then copies it and pastes it to a certain cell.

Thanks