PC Review


Reply
Thread Tools Rate Thread

How can I return the format & value of cell with VLOOKUP ?

 
 
rickcstahl
Guest
Posts: n/a
 
      7th Jun 2009
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
 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      7th Jun 2009
Not with a formula


--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"rickcstahl" <(E-Mail Removed)> wrote in message
news:01086295-C9F8-49E6-B56A-(E-Mail Removed)...
>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


 
Reply With Quote
 
Patrick Molloy
Guest
Posts: n/a
 
      8th Jun 2009
you could use MATCH() instead to return the row/column in the table, then
use a range object to get that cell's properties



"rickcstahl" <(E-Mail Removed)> wrote in message
news:01086295-C9F8-49E6-B56A-(E-Mail Removed)...
> 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


 
Reply With Quote
 
Patrick Molloy
Guest
Posts: n/a
 
      8th Jun 2009
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)






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



"rickcstahl" <(E-Mail Removed)> wrote in message
news:01086295-C9F8-49E6-B56A-(E-Mail Removed)...
> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vlookup and Trace Return Cell TM Microsoft Excel Misc 2 9th Mar 2010 11:30 PM
VLOOKUP to return Cell Address Steve Haack Microsoft Excel Worksheet Functions 3 20th Jan 2010 07:07 PM
Vlookup to Return Cell Name Not Value? it@clowwater.com Microsoft Excel Programming 5 8th Jan 2008 04:26 PM
Vlookup return NA for numbers format as general =?Utf-8?B?TWFyY2Vsbw==?= Microsoft Excel Worksheet Functions 1 3rd Sep 2007 05:50 PM
Return a Cell Address Using VLOOKUP Augie_Roy Microsoft Excel Worksheet Functions 2 12th Dec 2003 07:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:59 AM.