VLOOKUP for multiple values

jhb019

New Member
Joined
Apr 30, 2013
Messages
9
Hi

I'm doing a project in college and I really need some help.
I have to make a system for a crazy golf company on excel.
Basically, I have one worksheet with a bookings form on it and another with a food and drink ordering form.
The ordering form works by you selecting a customer ID on a list. You then select an item of food or drink from a list and this then brings up the price in the next cell which is taken from another worksheet via VLOOKUP. You then type in the quantity and this brings up the total in the final cell.

I then want to be able to put the amount of money spent on food and drink by a certain booking ID in a single cell on the bookings worksheet. I did this using VLOOKUP.

However, because you can only order one item of food at a time, if one booking ID orders more than one item of food, the total amount ordered by that booking ID is not displayed on the bookings worksheet. It only displays the first amount VLOOKUP finds on the food and drinks worksheet.

I want to know if there is a formula that is similar to VLOOKUP, but would allow me to retrieve multiple values from a different worksheet, add them together and then display the answer in a single cell.

Thanks
jhb019
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Hey J,

Wolcome to MrExcel.

It is possible. if you don't mind why don't you drop some sample data here.

Muz.
 
Upvote 0
Here is some images of my problem:
Bookings Form:
69rm4yvphl6qzbq651xz.jpg


Food and Drink Ordering Form:
6bz1xo8g06k18qoo99jj.jpg


As you can see, in the extras field it says £1.40 for Booking ID 5 rather than £5.30 which is should be. As you can see, VLOOKUP is returning the first value it finds.

The VLOOKUP formula I'm using is: =VLOOKUP(A9,'Food and Drink Ordering'!A5:E6,5,FALSE)

If I change the formula from FALSE to TRUE the value changes from £1.40 to £3.90 which is the second value on the food ordering worksheet.

Thanks
jhb019
 
Upvote 0
Use SUMIF instead of Vlookup

=SUMIF('Food and Drink Ordering'!A:A,A9,'Food and Drink Ordering'!E:E)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,217,349
Messages
6,136,051
Members
449,985
Latest member
rittersportyummy

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