Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 1
Question Formula for a fill color help

I can't figure out how to make a formula that will recognize a color as a value. More specifically; If b1 is made to be green (color index 4) I would like c1 to insert the letter Y. I am I'm looking for an IF statement so I can use it throughout the whole workbook.

The formula if I understand it should kind of look like (in C1):

=If(b1=colorindex4,"Y","")

I'm looking to put a "Y" in c1 if b1 is colored in green.

I would really like to also know how to insert a fill color in any formula!

Thank you for any of your help and time,

Bryan
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 93
Default Formula for a fill color help

You can add color and perform tasks with them through code but not with a
standard function. You can however create a UDF.

--
--
-John
Please rate when your question is answered to help us and others know what
is helpful.

"Bryan J" wrote in message
...

I can't figure out how to make a formula that will recognize a color as
a value. More specifically; If b1 is made to be green (color index 4) I
would like c1 to insert the letter Y. I am I'm looking for an IF
statement so I can use it throughout the whole workbook.

The formula if I understand it should kind of look like (in C1):

=If(b1=colorindex4,"Y","")

I'm looking to put a "Y" in c1 if b1 is colored in green.

I would really like to also know how to insert a fill color in any
formula!

Thank you for any of your help and time,

Bryan




--
Bryan J



  #3   Report Post  
Posted to microsoft.public.excel.newusers
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Formula for a fill color help

Try this sample from my archives:
http://www.savefile.com/files/378485
Count n Sum Cells By FillColor_BobPhillips_ColorIndex_UDF.xls
(nicely rendered, full details)

The sample file contains an implementation of Bob Phillips' ColorIndex
Function from his "Processing Coloured Cells" page at:
http://www.xldynamic.com/source/xld.ColourCounter.html
and some examples on how to use the UDF in Excel

In the sample file, albeit its not illustrated therein,
you would be able to use IF's along these lines:
=IF(ColorIndex(D2)=4,"Y","")
(above would be as per your intents expressed in the post)

Note: As clarified in Bob's page under "Constraints" section, you would
need to press F9 to force calculate as, quote: " .. change a cell's
colour or the text colour does not trigger the Excel calculate event.
This is not a shortcoming of the UDF, but of Excel's calculation event
... "
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
Bryan J wrote:
I can't figure out how to make a formula that will recognize a color as
a value. More specifically; If b1 is made to be green (color index 4) I
would like c1 to insert the letter Y. I am I'm looking for an IF
statement so I can use it throughout the whole workbook.

The formula if I understand it should kind of look like (in C1):

=If(b1=colorindex4,"Y","")

I'm looking to put a "Y" in c1 if b1 is colored in green.

I would really like to also know how to insert a fill color in any
formula!

Thank you for any of your help and time,

Bryan




--
Bryan J


  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 22,906
Default Formula for a fill color help

Bryan

Excel cannot do this without VBA code of some type.

See Chip Pearson's site for UDF's for working with colors.

http://www.cpearson.com/excel/colors.htm

With Chip's CellColorIndex UDF your formual would look like

=IF(Cellcolorindex(B1)=4,"Y","")


Gord Dibben MS Excel MVP

On Thu, 4 Jan 2007 18:52:59 +0000, Bryan J
wrote:


I can't figure out how to make a formula that will recognize a color as
a value. More specifically; If b1 is made to be green (color index 4) I
would like c1 to insert the letter Y. I am I'm looking for an IF
statement so I can use it throughout the whole workbook.

The formula if I understand it should kind of look like (in C1):

=If(b1=colorindex4,"Y","")

I'm looking to put a "Y" in c1 if b1 is colored in green.

I would really like to also know how to insert a fill color in any
formula!

Thank you for any of your help and time,

Bryan


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cells to be mandatory fill have a formula in it CBrausa Excel Discussion (Misc queries) 1 June 5th 06 08:17 PM
Formula Fill help Josh O. Excel Worksheet Functions 1 May 12th 06 09:46 PM
Macro or Custom button to fill in the same formula TJ Excel Worksheet Functions 4 March 15th 06 10:33 PM
Trend using the same formula as the fill handle does Roy G. Biv Excel Worksheet Functions 0 October 18th 05 08:31 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM


All times are GMT +1. The time now is 04:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"