# VLOOKUP but add values of the same order number?

#### Ben171

##### Board Regular
I have created a very simple workbook to demonstrate what I am asking.

Lets say I have one sheet called 'order numbers' and a second sheet called 'Carriage charge'

On sheet 2 "Carriage charge" you can see in column D i have a blank column in which i want to add the order value from sheet1

However as you can see from sheet 1 "order numbers" there is one order with the same order number 3 times. Therefore when I do my lookup, i would like it to add these 3 orders together so that it displays the total of £110, rather than find the first one and display £30.

hope that makes sense

### Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
You would not use VLOOKUP for that (VLOOKUP will only return the first value).
You would use the SUMIF function, to sum all values matching the ID you want.
See: MS Excel: How to use the SUMIF Function (WS)

There is also a SUMIFS function, if you have more than one criterion:

You would not use VLOOKUP for that (VLOOKUP will only return the first value).
You would use the SUMIF function, to sum all values matching the ID you want.
See: MS Excel: How to use the SUMIF Function (WS)

There is also a SUMIFS function, if you have more than one criterion:
whoops, thank you!

I will check this out as I have not used this function before

whoops, thank you!

I will check this out as I have not used this function before
No worries!

Those functions are pretty simple to use (they are easier to understand than VLOOKUP, IMO), and those links show examples.
If you run into any issues incorporating it into your worksheet, feel free to post back here to this thread for more assistance.

No worries!

Those functions are pretty simple to use (they are easier to understand than VLOOKUP, IMO), and those links show examples.
If you run into any issues incorporating it into your worksheet, feel free to post back here to this thread for more assistance.
Using these examples i managed to figure it out and get what i wanted, thanks for your help

You are welcome.
Glad I was able to help!

Replies
6
Views
384
Replies
7
Views
141
Replies
22
Views
704
Replies
9
Views
165
Replies
11
Views
415

1,196,269
Messages
6,014,351
Members
441,816
Latest member
Klingon1960

### 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.

### Which adblocker are you using?

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

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