Consolidate without shifting location

excelhobo

New Member
Joined
Dec 30, 2016
Messages
2
Hello all, first post here!

I could use some help with the following problem. I have a list of Customers and each purchase they have made by receipt # and item. However my employer would like to be able to find the total of each receipt while still being able to see each item bought. There is a variable number if items in each receipt.

If anyone has any suggestions that may work (either through formulas and/or VBA) it would be very appreciated!

Current Data
Receipt NumberTotalItem Number
123456$10.0017453
123456$15.0071664
123456$10.0037489
111111$100.0076514
222222$25.0066964
333333$100.0034686
333333$50.0048633
333333$25.0075434
333333$20.0066834

<tbody>
</tbody>

If I consolidate the rows, I will have the total for each receipt, but the item numbers would no longer match up with the receipt number.

Consolidate Result (not good)
Receipt NumberTotalItem Number
123456$35.0017453
111111100.0071664
22222225.0037489
333333195.0076514
66964
34686
48633
75434
66834

<tbody>
</tbody>

Desired Result (return total to top of each repeated receipt number)
Receipt NumberTotalItem Number
12345635.0017453
12345671664
12345637489
111111100.0076514
22222225.0066964
333333195.0034686
33333348633
33333375434
33333366834

<tbody>
</tbody>

Any help is very appreciated!
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
First you need to make sure that your currency columns are properly formatted as such. Then this:


Excel 2016 (Windows) 32 bit
ABCDEFG
1Current Data
2Receipt NumberTotalItem NumberSummary
3123456$ 10.0017453123456$ 35.0017453
4123456$ 15.007166412345671664
5123456$ 10.003748912345637489
6111111$100.0076514111111$ 100.0076514
7222222$ 25.0066964222222$ 25.0066964
8333333$100.0034686333333$ 195.0034686
9333333$ 50.004863333333348633
10333333$ 25.007543433333375434
11333333$ 20.006683433333366834
Sheet4
Cell Formulas
RangeFormula
E3=A3
F3=IF(E3=E2,"",SUMIF($A$3:$A$11,E3,$B$3:$B$11))
G3=C3
 
Upvote 0
You might try using a Pivot Table to summarize your data. Place the Receipt Number, then the Item Number under Row Labels, and place the Total under Values and specify Sum of Total as your value field setting.
 
Upvote 0
I didn't see AliGW's post until after I had posted... her solution looks EXACTLY like your request!
 
Upvote 0
I'm sure a pivot table would be fine, but they are not to everybody's taste, partly because they don't update automatically. :)
 
Upvote 0

Forum statistics

Threads
1,214,636
Messages
6,120,664
Members
448,976
Latest member
sweeberry

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