Index or match?

S

Stevie G

Im relatively new to using the index function but believe it will do what i
need. I have a bit of experience using Vlookup but i dont think it will do
the job for what I need.

I have a price list for blinds which is divided by height and width. I want
to be able to put the height and width into a cell or cells and then use a
lookup formula to return the price, sometimes if the blidn doesnt match the
exact size we always round it to the closet value in the table.

eg of table

609 813
914 23.53 29.05
1219 25.91 32.27
1524 28.34 35.49


so if the blind was 810 by 910 the price would be 29.05

Can anyone suggest a formula which will do this for me
 
A

aidan.heritage

Im relatively new to using the index function but believe it will do whati
need. I have a bit of experience using Vlookup but i dont think it will do
the job for what I need.

I have a price list for blinds which is divided by height and width. I want
to be able to put the height and width into a cell or cells and then use a
lookup formula to return the price, sometimes if the blidn doesnt match the
exact size we always round it to the closet value in the table.

eg of table

                 609            813
914             23.53             29.05
1219    25.91          32.27
1524    28.34          35.49

so if the blind was 810 by 910 the price would be 29.05

Can anyone suggest a formula which will do this for me

I'd use the match function BUT set the sizes to the LOWEST value we
would use that size for (so 0, 610 instead of 609, 813)

Match the width against the width, and the height against the height -
use the resulting vectors with the index function.

This question sounds horribly familiar as I've done a sample sheet for
someone else with the same problem,but of course I cannot find it at
the moment!
 
S

Stevie G

Aidan thanks very much for the help it worked great, i now have another
question if you would be so kind! If i wanted to lookup the price from
various tables ie Price Group A, Price Group B, Price Group C etc.

Can i add a variable that will allow me to pick which table to lookup
depending on what was entered in a certain cell, for example if i put an b in
it, i would want to index price group b

I have tried referring to another cell that contains the array data
=INDEX(N15,I11,H11) where n15 = the name of the range i want to use but this
doesnt seem to work
 
P

Pete_UK

Steve,

You can use INDIRECT to do what you describe. If you post the formula
you are using and give a few more details of your data layout and what
you want to achieve then I'm sure someone (like me) will be able to
give you an amended formula.

Pete
 
P

Pete_UK

Steve emailed me directly (and it turns out he is in the same town as
me), so I was able to amend his formulae to incorporate INDIRECT in
the INDEX formula - essentially, something like:

=INDEX(INDIRECT("table"&$C$3),H7,I7)

where H7 and I7 contained formulae to match the horizontal and
vertical components, and C3 contained a pull-down to select A, B, C or
D. There were 4 named ranges (tableA, tableB etc.) which he wanted to
be able to select from.

Just for completeness ...

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top