View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Skimmer Skimmer is offline
external usenet poster
 
Posts: 5
Default Test cell interior color by worksheet function?

Chris,

Am I being clear as mud, or do you understand what I'm asking?

My task: to examine cells into which a User has placed two pieces of
information - (1) an alphabetic or numerical content and (2) a cellular
interior color fill.

I examine the cellular interior color fill, and based upon this I check for
content - giving full credit for alphabetic data, or a decimal calculation
for numeric content. The expression I expect to take the form:

=if(HHH(C6) = PPG, if(ISNUMBER(C6), C6/Full_Value , Full_Value), 0)

Here, I use:
(a) "HHH" as a placeholder name for the Worksheet Function I'm requesting
help to identify, which can extract the cellular interior color fill
information from the cell.
(b) "PPG" as a variable I declare, which holds the numerical code for the
palette color of interest.

Will I be forced to go to VBA in order to implement this screening? Or, is
there a worksheet function which returns the necessary fill code? I haven't
seen one, so far. And, you matched my understanding of the CELL function.

R,
Tom

"Frank Pytel" wrote:
Skimmer;

Probably Chip is highly accurate. Like I said, What is the conditional
formatting that turns this cell to the shade that you want it. You should
concentrate your formula on this value and use it as a qualifier.

For instance, you set your conditional formatting in C6 to read

if=to1, cell shade = ppg

Then your qualifier can be the number 1. I think I see another question,
that is you are using the hex number of the color for some calculation.
Create an array of hex numbers and reference this with a lookup() to
determine what your next value will be. You can set your qualifiers to equal
whatever hex number you wish to assign them in column a with the hex value in
column b.

God Bless

Frank Pytel

http://groups.google.com/group/excel...mming?lnk=iggc


"Chip Pearson" wrote:
The CELL("color",Ref) function returns either 1 or 0, indicating whether
negative numbers are displayed in color. Overall, it is a useless function.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)

"Skimmer" wrote:

Frank,

My understanding of CELL("color",C6) worksheet function is that is looks to
see what the content text coloration is - binary answer. If it's property
specifies colored for negative numeric value, then it returns a "1". If no
colorization is specified for negative numeric value, then it returns "0"...
This doesn't address cell interior color(shading /patterns). Perhaps
elaboration by example... trying to accomplish:

If the cell solid interior color is a pale green, then I want to treat it as
"Type A" and look to see what the contents are. The contents will either be
alphabetic or numeric, using an "IS" worksheet function will distinguish
which. Alphabetic content defaults to highest value assigned a "Type A"
event. If the content is numeric, then it will be used to calculate a
fraction of the default highest value.

Key:
HHH = function I'm looking for (for cell color, and using your cell
reference "C6")
PPG = palette pale-green code
Full_Value = 100
So, my cell-checking formula would look something like this:

=if(HHH(C6) = PPG, if(ISNUMBER(C6), C6/Full_Value , Full_Value), 0)

I'm trying to avoid using macros, as some recipients of the workbook will
not be able to use them.

R,
Skimmer