Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / March 2008

Tip: Looking for answers? Try searching our database.

VLookup and cell shading

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sherry - 27 Mar 2008 21:43 GMT
I am pulling in data using a Vlookup and would like for it to keep the same
cell color shading as in the original spreadsheet that it is pulling from.  
Is this possible?
Pete_UK - 27 Mar 2008 22:06 GMT
No, a formula can not be used to convey formatting information, only values.

If the cell shading is applied through conditional formatting, though, the
same conditional formatting could be applied to the cell with the VLOOKUP
formula in, to achieve the same effect.

Pete

>I am pulling in data using a Vlookup and would like for it to keep the same
> cell color shading as in the original spreadsheet that it is pulling from.
> Is this possible?
mvk - 30 Mar 2008 02:38 GMT
Yes!  But you would need to use VBA.  You first need to identify the address
of the cell with the value that was chosen, and then use VBA to return the
format of this cell and then apply that format to the new cell.

To do the first bit you could add a column which holds the row number, you
know the column letter and you can now make a reference to the cell.

Hope this helps, if not happy to go into more detail.

MVK

>I am pulling in data using a Vlookup and would like for it to keep the same
> cell color shading as in the original spreadsheet that it is pulling from.
> Is this possible?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.