Using IF formulas

G

Guest

Guest
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.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
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
 
Upvote 0

Forum statistics

Threads
1,214,622
Messages
6,120,585
Members
448,972
Latest member
Shantanu2024

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top