Order Database Calculations

razzandy

Active Member
Joined
Jun 26, 2002
Messages
400
Office Version
  1. 2007
Platform
  1. Windows
I have a list of order numbers in column A which can get duplicated if there is more than one item per order. What I want to do is have a formula result in column C which would calculate weights entered in Column B. So if a particular order had only one line item there would be only one weight and it would give a Total weight in Column C. If there were duplicate order numbers due to multiple line items in one order I would like a Total weight for all the line items relating to that order. So an example would look like below.

A ¦ B ¦ C
Order# ¦ Weight Kg ¦ Total Weight kg
123 ¦ 100 ¦ 100
124 ¦ 80 ¦ 125
124 ¦ 45 ¦ 125
125 ¦ 130 ¦ 130

Thanks in advance
 

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.
To get your requested response:
C2:: =SUMIF(A:A,A2,B:B)
copy down

To get a single value per order
C2:: =IF(A2=A3,"",SUMIF(A:A,A2,B:B))
copy down
 
Upvote 0
Thanks tweedle

I’ve become out of practice with Excel over the years but I did manage to find the sumif formula in my past posts after I posted this thread.

But the addition to get a single value is great and will be really useful for me

So thanks all round

Cheers
:-)
 
Upvote 0

Forum statistics

Threads
1,224,618
Messages
6,179,916
Members
452,949
Latest member
beartooth91

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