Conditional Formatting

darksnowman56

New Member
Joined
Jun 22, 2007
Messages
32
column A has dollar amounts, column B has a yes/no list, and a total at the bottom of column A. im assuming conditional formatting will help me with what im looking to do, but im having a little trouble with the formula. What i need is a formula that says if column B has a yes then the number next to the yes (in column A) will be totaled up. So only numbers next to the yes will be totaled in the total box at the bottom of column A.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Lewiy

Well-known Member
Joined
Jan 5, 2007
Messages
4,284
Not conditional formatting, you will want SUMIF() for this:
Excel Workbook
AB
125yes
230no
319yes
440no
534yes
690no
725yes
8103
Sheet2
 
Upvote 0

Jonmo1

MrExcel MVP
Joined
Oct 12, 2006
Messages
44,061
that's not conditional formatting. Conditional formatting changes the FORMAT of a cell based on it's value. It doesn't do any mathematical fomulations. What you want is a sumif formula.

=SUMIF(B1:B1000,"Yes",A1:A1000)
 
Upvote 0

texasalynn

Well-known Member
Joined
May 19, 2002
Messages
8,458
you asked about conditional formatting, but your message talks about summing. So I think you want the sumif function
 
Upvote 0

venkat1926

Well-known Member
Joined
Aug 21, 2005
Messages
4,824
if you want to total only those A values which has corresponding B value as "yes" and if your data is from A1 to B9 use this formula

=SUMPRODUCT(($B$1:$B$9="yes")*($A$1:$A$9))

modify the formula to suit you.
 
Upvote 0

Forum statistics

Threads
1,191,361
Messages
5,986,203
Members
440,010
Latest member
cdotshel

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
Top