Thanks:  0
Likes:  0

# Thread: Using IF formulas

1. I have a worksheet with some information in cells with a "blue" fill color and other cells in a "green" fill color. All numbers are eventually going to be in "blue". I would like to develop a formula that will calculate the total of the "blue" cells and continue to automatically calculate each time i change the cell colors. Any ideas will be appreciated.

2. Suppose cells A1:A5 contain {10;3;5;6;7} and (B1,B3:B4) contain 1.

With cells A1:A5 selected and A1 as the active cell you could apply the following Conditional Format...

1st Condition: Formula Is using =B1 formatting Blue cell pattern
2nd Condition: Formula Is using =TRUE formatting Green cell pattern

You can now toggle the background color by setting B1:B5 to 1 or blank. Column B can be hidden if desired.

...And, the following formula will produced the desired sum...

=SUMIF(B1:B5,1,A1:A5)

[ This Message was edited by: Mark W. on 2002-03-07 16:02 ]

3. [ This Message was edited by: Chris Davison on 2002-03-09 01:23 ]

## User Tag List

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•