View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy Patrick Molloy is offline
external usenet poster
 
Posts: 1,049
Default How can I return the format & value of cell with VLOOKUP ?

i hit send too early
i was suggesting that MATCH would allow you to do this

example
so instead of
dim val as string
val = WorksheetFunction.VLOOKUP(what, where, ret, false)

dim val as Range
dim rowindex as long
rowindex = WorksheetFunction.MATCH(what, where.columns(1), false)
set val = where.resize(1,1).Cells(index,ret)






whe what is string to be found, where is the range table to be searched,
ret is the return column



"rickcstahl" wrote in message
...
I am using VLOOKUP to retrieve values from several different worksheets.
I
also wish to retreive the cell's format (color). There are many different
colors on the worsheets based on many complex criteria. Is there anyway
the
individual formats of the cells retrieved can also be returned with the
values ?

Thanks,
Rick