Excel check one column for highlighting and return number

G

Guest

I think Excel should let you write a formula that checks for highlighting in
one column and returns a number. Because when you import into access you
lose the formatting.

If column N has a highlight of yellow, return the number 1 in column O.

Thank you,
Vicki

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...b-239190af5a36&dg=microsoft.public.excel.misc
 
G

Guest

This could be a good idea - barring the fact that you can write a function to
do much the same thing. There are many people who want to either emulate the
format or just find things based on format (cell fill color, text format,
etc) and perhaps an easier way to determine them with some built in worksheet
functions wouldn't be such a bad thing.

In the meantime, I'd suggest that if this were to be done that the specific
color code of colors be returned rather than just a true false indicator:
more useful in emulating the formatting.

In the meantime, here's a Function that will tell you the interior color of
a cell. Just enter the address of the cell you want to know the interior
color of and it will tell you. You could put this in column N cells and
point to column O cells like this formula in N1
=WhatColorIsIt(O1)
and it will return value of the color in O1.

Function WhatColorIsIt(anyCell As Range) As Variant
On Error Resume Next ' in case invalid cell Reference passed
WhatColorIsIt = anyCell.Interior.ColorIndex
If Err <> 0 Then
WhatColorIsIt = "Invalid Reference"
Err.Clear
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top