Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Mr Wiffy
 
Posts: n/a
Default LOOKUPS - Creating LOOKUPs where two different values must BOTH be satisfied.

I am having a problem with one of my spreadsheets for my GNVQ I.T.
coursework. Please help!

My spreadsheet is for a boat hire company. On one table is a list of the
boats, times to hire the boats and the cost to hire the boat for that amount
of time.
eg.
Boat One | 2 hours | £25 (per head)
Boat One | 3 hours | £35 (per head)
Boat Two | 2 hours | £30 (per head) etc. etc.

On another sheet, there is a table that lists the customers that have hired
the boats, which boat they hired, how many people are on the boat and the
time it has been hired for.
eg.
Mr R Brown | Boat One | 3 hours | 4 people | (Price) etc. etc.
I want to establish a VLOOKUP in a 'Price' box on the second sheet that will
look for the combination of 'Boat One' and '3 hours' on the FIRST sheet,
then see what the price is and multiply it by how many people are on the
boat.

I tried:
=VLOOKUP(B15:C15 [the cells that Boat One and 3 hours were in on the second
sheet], 'First Sheet'!A10:C40 [the first three columns on the first sheet,
that displayed the boat name, time and price], 3 [which would give the price
as it was in the third column], FALSE)*D4

But this did not work. I think it is something to do with the B15:C15 at the
start of the formula, as when I took one out and left it as B15 the formula
worked fine but obviously did not return the desired result.

I am desperate for some help here and would be grateful for ANY pointers you
could give me!

Thanks in advance,
Imogen


  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

You can use an array formula, however the design has some flaws, remove all
text from the parts you need to calculate with or you won't be able to do
any calculations, so in the price column use only numbers and in the number
of people use only numbers, the header should be explanatory enough

for the price

=INDEX(Price_range, MATCH(1,(Boat_Range=Boat_number)*(Time_Range=Time) ,0))

it needs to be entered with ctrl + shift & enter

do the same for number of people

=INDEX(People_Number_range,
MATCH(1,(Boat_Range=Boat_number)*(Time_Range=Time) ,0))

then multiply the two

--
Regards,

Peo Sjoblom

--
Regards,

Peo Sjoblom


"Mr Wiffy" wrote in message
...
I am having a problem with one of my spreadsheets for my GNVQ I.T.
coursework. Please help!

My spreadsheet is for a boat hire company. On one table is a list of the
boats, times to hire the boats and the cost to hire the boat for that
amount of time.
eg.
Boat One | 2 hours | £25 (per head)
Boat One | 3 hours | £35 (per head)
Boat Two | 2 hours | £30 (per head) etc. etc.

On another sheet, there is a table that lists the customers that have
hired the boats, which boat they hired, how many people are on the boat
and the time it has been hired for.
eg.
Mr R Brown | Boat One | 3 hours | 4 people | (Price) etc. etc.
I want to establish a VLOOKUP in a 'Price' box on the second sheet that
will look for the combination of 'Boat One' and '3 hours' on the FIRST
sheet, then see what the price is and multiply it by how many people are
on the boat.

I tried:
=VLOOKUP(B15:C15 [the cells that Boat One and 3 hours were in on the
second sheet], 'First Sheet'!A10:C40 [the first three columns on the first
sheet, that displayed the boat name, time and price], 3 [which would give
the price as it was in the third column], FALSE)*D4

But this did not work. I think it is something to do with the B15:C15 at
the start of the formula, as when I took one out and left it as B15 the
formula worked fine but obviously did not return the desired result.

I am desperate for some help here and would be grateful for ANY pointers
you could give me!

Thanks in advance,
Imogen



  #3   Report Post  
Charyn
 
Posts: n/a
Default

Are you required to use lookups in the the formula?

"Mr Wiffy" wrote in message
...
I am having a problem with one of my spreadsheets for my GNVQ I.T.
coursework. Please help!

My spreadsheet is for a boat hire company. On one table is a list of the
boats, times to hire the boats and the cost to hire the boat for that
amount of time.
eg.
Boat One | 2 hours | £25 (per head)
Boat One | 3 hours | £35 (per head)
Boat Two | 2 hours | £30 (per head) etc. etc.

On another sheet, there is a table that lists the customers that have
hired the boats, which boat they hired, how many people are on the boat
and the time it has been hired for.
eg.
Mr R Brown | Boat One | 3 hours | 4 people | (Price) etc. etc.
I want to establish a VLOOKUP in a 'Price' box on the second sheet that
will look for the combination of 'Boat One' and '3 hours' on the FIRST
sheet, then see what the price is and multiply it by how many people are
on the boat.

I tried:
=VLOOKUP(B15:C15 [the cells that Boat One and 3 hours were in on the
second sheet], 'First Sheet'!A10:C40 [the first three columns on the first
sheet, that displayed the boat name, time and price], 3 [which would give
the price as it was in the third column], FALSE)*D4

But this did not work. I think it is something to do with the B15:C15 at
the start of the formula, as when I took one out and left it as B15 the
formula worked fine but obviously did not return the desired result.

I am desperate for some help here and would be grateful for ANY pointers
you could give me!

Thanks in advance,
Imogen




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating custom list with a comma in it barnabel Excel Discussion (Misc queries) 6 January 10th 06 06:14 AM
creating many invoices with excel data creating many invoices from excel data Excel Discussion (Misc queries) 1 May 2nd 05 03:48 AM
Skip some columns when creating a chart MikeJ Charts and Charting in Excel 3 April 15th 05 12:15 AM
Eliminate creating list that returns blank cells Marc Todd Excel Worksheet Functions 1 January 26th 05 09:58 PM
Creating a Microsoft Words document from an existing Excel spreads ringo tan New Users to Excel 1 December 30th 04 08:01 PM


All times are GMT +1. The time now is 04:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"