Donate SIGN UP

Conditional Format Function Excel

Avatar Image
camioneur | 11:45 Tue 25th Jul 2006 | Technology
7 Answers
Is it possible to use the "IF" function to determine the value of a cell depending on the format (colour) of another.

ie. IF A1 = green then A5 = sum(A2 + A3)

hope that makes sense
Gravatar

Answers

1 to 7 of 7rss feed

Best Answer

No best answer has yet been selected by camioneur. Once a best answer has been selected, it will be shown here.

For more on marking an answer as the "Best Answer", please visit our FAQ.
Sorry camioneur but I don't think that you will be able to do that with a function. I am sure you will have to use VBA based on the ColorIndex.

Can't be much more help that that - but you could try some of the specialist Excel sites like Mr Excel.com

Just as an afterthought - if you haven't got too many coloured cells in your sheet then you could create a new column and put in a text description of the coloured cell in the preceding column into this new column. Then you could use an IF function :

=IF(A1 = "green", A2=A3)

Question Author
now I like where you're coming from EuanC, this looks promising, what about the other way round then, would it be possible to format a cell as the result of an IF function?

=IF A1=A2 then format A3 green, is that possible?

Just about grasping the function but afraid VBA goes over my head, thanks for the help by the way
Well you can kind of do that :

Taking the example of you having data in columns A & B and inserting this formula in column C:

= IF(A1=B1,1,0)

This will return a 1 if the values in A1 & B1 are the same & a 0 if they are not.

You then need to format the column, so highlight column C

Go to the Format dropdown menu - Select Conditional Formatting

Enter the value 1so that the condition reads :

Cell Value is equal to 1

Now click on the Format button and select your colour from the pallette. Now Click OK & OK again.
Question Author
Ok EuanC thanks again, I'll give that a go..
Camioneur, try the Help in Excel and choose 'Formatting Worksheets', then choose 'Using Conditional Formats' - shows examples of colouring cells conditionally.
Camioneur, just found this useful site for the future (while trying to solve a problem of my own):-

http://www.kayodeok.btinternet.co.uk/favorites /kbofficeexcel.htm

1 to 7 of 7rss feed

Do you know the answer?

Conditional Format Function Excel

Answer Question >>

Related Questions

Sorry, we can't find any related questions. Try using the search bar at the top of the page to search for some keywords, or choose a topic and submit your own question.