Sumif?

kvonatzigen

New Member
Joined
May 16, 2011
Messages
10
Hello All!

I'm in need of a bit of help. I have a data set as follows:

A B
<TABLE style="WIDTH: 153pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=204><COLGROUP><COL style="WIDTH: 80pt; mso-width-source: userset; mso-width-alt: 3913" width=107><COL style="WIDTH: 73pt; mso-width-source: userset; mso-width-alt: 3547" width=97><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc 0.5pt solid; BACKGROUND-COLOR: transparent; WIDTH: 80pt; HEIGHT: 12.75pt; BORDER-TOP: #cccccc 0.5pt solid; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 height=17 width=107>$9,822.68</TD><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc; BACKGROUND-COLOR: transparent; WIDTH: 73pt; BORDER-TOP: #cccccc 0.5pt solid; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 width=97>$0.00</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc 0.5pt solid; BACKGROUND-COLOR: transparent; WIDTH: 80pt; HEIGHT: 12.75pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 height=17 width=107>$25,000.00</TD><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc; BACKGROUND-COLOR: transparent; WIDTH: 73pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 width=97>$25,000.00</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc 0.5pt solid; BACKGROUND-COLOR: transparent; WIDTH: 80pt; HEIGHT: 12.75pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 height=17 width=107>$2,554.78</TD><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc; BACKGROUND-COLOR: transparent; WIDTH: 73pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 width=97>$0.00</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc 0.5pt solid; BACKGROUND-COLOR: transparent; WIDTH: 80pt; HEIGHT: 12.75pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 height=17 width=107>$815,239.27</TD><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc; BACKGROUND-COLOR: transparent; WIDTH: 73pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 width=97>$906,867.00</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc 0.5pt solid; BACKGROUND-COLOR: transparent; WIDTH: 80pt; HEIGHT: 12.75pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 height=17 width=107>$78,806.18</TD><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc; BACKGROUND-COLOR: transparent; WIDTH: 73pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 width=97>$0.00</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc 0.5pt solid; BACKGROUND-COLOR: transparent; WIDTH: 80pt; HEIGHT: 12.75pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 height=17 width=107>$13,981.86</TD><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc; BACKGROUND-COLOR: transparent; WIDTH: 73pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 width=97>$0.00</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc 0.5pt solid; BACKGROUND-COLOR: transparent; WIDTH: 80pt; HEIGHT: 12.75pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 height=17 width=107>$6,737.99</TD><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc; BACKGROUND-COLOR: transparent; WIDTH: 73pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 width=97>$0.00</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc 0.5pt solid; BACKGROUND-COLOR: transparent; WIDTH: 80pt; HEIGHT: 12.75pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 height=17 width=107>$11,652.40</TD><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc; BACKGROUND-COLOR: transparent; WIDTH: 73pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 width=97>$0.00</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc 0.5pt solid; BACKGROUND-COLOR: transparent; WIDTH: 80pt; HEIGHT: 12.75pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 height=17 width=107>$5,791.41</TD><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc; BACKGROUND-COLOR: transparent; WIDTH: 73pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 width=97>$0.00</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc 0.5pt solid; BACKGROUND-COLOR: transparent; WIDTH: 80pt; HEIGHT: 12.75pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 height=17 width=107>$9,445.44</TD><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc; BACKGROUND-COLOR: transparent; WIDTH: 73pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 width=97>$0.00</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc 0.5pt solid; BACKGROUND-COLOR: transparent; WIDTH: 80pt; HEIGHT: 12.75pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 height=17 width=107>$4,000.00</TD><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc; BACKGROUND-COLOR: transparent; WIDTH: 73pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 width=97>$0.00</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc 0.5pt solid; BACKGROUND-COLOR: transparent; WIDTH: 80pt; HEIGHT: 12.75pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 height=17 width=107>$39,288.33</TD><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc; BACKGROUND-COLOR: transparent; WIDTH: 73pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 width=97>$0.00</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc 0.5pt solid; BACKGROUND-COLOR: transparent; WIDTH: 80pt; HEIGHT: 12.75pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 height=17 width=107>$183,919.09</TD><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc; BACKGROUND-COLOR: transparent; WIDTH: 73pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 width=97>$0.00</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc 0.5pt solid; BACKGROUND-COLOR: transparent; WIDTH: 80pt; HEIGHT: 12.75pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 height=17 width=107>$626,406.67</TD><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc; BACKGROUND-COLOR: transparent; WIDTH: 73pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 width=97>$0.00</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc 0.5pt solid; BACKGROUND-COLOR: transparent; WIDTH: 80pt; HEIGHT: 12.75pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 height=17 width=107>$66,202.54</TD><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc; BACKGROUND-COLOR: transparent; WIDTH: 73pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 width=97>$0.00</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc 0.5pt solid; BACKGROUND-COLOR: transparent; WIDTH: 80pt; HEIGHT: 12.75pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 height=17 width=107>$27,556.38</TD><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc; BACKGROUND-COLOR: transparent; WIDTH: 73pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 width=97>$0.00</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc 0.5pt solid; BACKGROUND-COLOR: transparent; WIDTH: 80pt; HEIGHT: 12.75pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 height=17 width=107>$124,866.32</TD><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc; BACKGROUND-COLOR: transparent; WIDTH: 73pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 width=97>$0.00</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc 0.5pt solid; BACKGROUND-COLOR: transparent; WIDTH: 80pt; HEIGHT: 12.75pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 height=17 width=107>$0.01</TD><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc; BACKGROUND-COLOR: transparent; WIDTH: 73pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 width=97>$0.00</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc 0.5pt solid; BACKGROUND-COLOR: transparent; WIDTH: 80pt; HEIGHT: 12.75pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 height=17 width=107>$123,986.31</TD><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc; BACKGROUND-COLOR: transparent; WIDTH: 73pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 width=97>$125,000.00</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc 0.5pt solid; BACKGROUND-COLOR: transparent; WIDTH: 80pt; HEIGHT: 12.75pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 height=17 width=107>$1,068,275.81</TD><TD style="BORDER-BOTTOM: #cccccc 0.5pt solid; BORDER-LEFT: #cccccc; BACKGROUND-COLOR: transparent; WIDTH: 73pt; BORDER-TOP: #cccccc; BORDER-RIGHT: #cccccc 0.5pt solid" class=xl63 width=97>$0.00</TD></TR></TBODY></TABLE>

I would like to subtract the cells from column A whenever they are less than or equal to the adjacent cells of column B. Then I would like to add the total of column B to the adjusted total of Column A.

Essentially, I want something to check the values, determine if A<=B, if so subtract the A's that are less than or equal to B's from A-TOTAL and add B's to A-TOTAL resulting in a NEW TOTAL.

TOTALs are:
A:$3,243,533.47
B:$1,056,867

The end result should be a NEW TOTAL of:
A TOTAL - (A COLUMN CELLS <= B COLUMN CELLS) + B TOTAL = NEW TOTAL

or

$3,243,533.47 - ($964,225.58) + $1,056,867 = $3,336,174.89

Thank you for your help!
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Excel Workbook
AB
19,822.680
225,000.0025,000.00
32,554.780
4815,239.27906,867.00
578,806.180
613,981.860
76,737.990
811,652.400
95,791.410
109,445.440
114,000.000
1239,288.330
13183,919.090
14626,406.670
1566,202.540
1627,556.380
17124,866.320
180.010
19123,986.31125,000.00
201,068,275.810
21
223,361,174.89
Sheet1
 
Upvote 0

Forum statistics

Threads
1,224,514
Messages
6,179,220
Members
452,895
Latest member
BILLING GUY

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