How to SUM UP A COLUMN that matches

SDKBRK

Board Regular
Joined
Feb 1, 2003
Messages
162
Don't know how to word this. Here is an example of what I'm trying to do.

A1-050-7755 B1-64
A2-BLANK B2-274
A3-030-5555 B3-5
A4-BLANK B4-1
A5-BLANK B5-1
A6-030-4444 B3-6
A7-050-7755 B1-35


In column C I want it to sum up B1 & B2 but not B3 because its a different item. How do I write that formula that will sum up qty's in columnB and stop when it comes to a blank cell in colA.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
The formula works but I'm trying to have the formula in the same row as the item in col A. I'm been trying to get it to work with no luck. Any help would be appreciated. thanks
 
Upvote 0
Do the blank cells in column A represent the value of the same non-blank cell above it?

If not, ignore the rest.

If so, insert a new row above row 1 and enter a name for each column in A1 and B1. Select cell A1 and press Ctrl + Shift + 8* (all at the same time) and the entire range will be selected. Don't use the 8 or * key in the number pad, use the one above the "u" key. Then press F5. Select Special and then select blanks. This will highlight all of the blank cell within your range of cells. Press the "=" key and then press the up arrow and then press Ctrl + Enter. This will fill in all of the blank cells with the value of the non-blank cell above it.

Then go back to A1 and select Data-Subtotals in the menu bar. Select the column name you gave for column A in the first dropdown box, sum in the second and check the name for column A in the third box and uncheck the name for Column B in the third box and hit OK.
 
Upvote 0
Since we have here a data representation that requires complex processing...
Book3
ABCD
1ItemValueSubTotalRowIdx
2050-7755-64-3432
3-274  
4030-5555-5-134
5-1  
6-1  
7030-4444-6-417
8050-7755-35-358
9
Sheet1


Formulas...

C2:

=IF(A2<>"",SUM(B2:INDEX(B:B,MIN(D3:INDEX(D:D,MATCH(9.99999999999999E+307,D:D))))),"")

D2:

=IF(A2<>"",ROW(A2),"")
 
Upvote 0

Forum statistics

Threads
1,214,429
Messages
6,119,433
Members
448,897
Latest member
ksjohnson1970

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