Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Lookup formula in excel
I have a spreadsheet of data set up in excel something like this
UK France Spain 5kg 5.00 10.00 15.00 10kg 6.00 12.00 16.00 15kg 7.00 13.00 16.25 20kg 8.00 15.00 16.50 I want to be able to type in a cell the county name and then in another cell the weight, and then create a formaula which gives me the price from the table above. ie if i want france at 15kg... then the answer would be 13.00 Is this possible? any help would be really appreciated |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Lookup formula in excel
F2 contains weight (I ignored units) and F1 country. Change ranges to suit
=INDEX($B$2:$D$5,MATCH(F2,$A$2:$A$5,0),MATCH(F1,$B $1:$D$1,0)) A B C D UK France Spain 5 5.00 10.00 15.00 '<=== Row 2 10 6.00 12.00 16.00 15 7.00 13.00 16.25 20 8.00 15.00 16.50 "Kerry" wrote: I have a spreadsheet of data set up in excel something like this UK France Spain 5kg 5.00 10.00 15.00 10kg 6.00 12.00 16.00 15kg 7.00 13.00 16.25 20kg 8.00 15.00 16.50 I want to be able to type in a cell the county name and then in another cell the weight, and then create a formaula which gives me the price from the table above. ie if i want france at 15kg... then the answer would be 13.00 Is this possible? any help would be really appreciated |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Lookup formula in excel
I saw something on how to do this not long ago in "This isn't Excel, it's
Magic" I'm assuming you have your data in cells A1 to D5 for this example Select B1 (UK) to D5 (16.5) Insert - Name - Create Select Top Row Now select A2 (5kg) to D5 (16.5) Insert - Name - Create Select LEFT column To find the intersection enter =_15kg France The _15kg and France will be named ranges. "Kerry" wrote: I have a spreadsheet of data set up in excel something like this UK France Spain 5kg 5.00 10.00 15.00 10kg 6.00 12.00 16.00 15kg 7.00 13.00 16.25 20kg 8.00 15.00 16.50 I want to be able to type in a cell the county name and then in another cell the weight, and then create a formaula which gives me the price from the table above. ie if i want france at 15kg... then the answer would be 13.00 Is this possible? any help would be really appreciated |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Lookup formula in excel
Adding to Barb's response you could use the following in your cell:
=INDIRECT("_"& F2 & " " & F1) Where F2 = weight (15Kg) F1= country (France) HTH "Barb Reinhardt" wrote: I saw something on how to do this not long ago in "This isn't Excel, it's Magic" I'm assuming you have your data in cells A1 to D5 for this example Select B1 (UK) to D5 (16.5) Insert - Name - Create Select Top Row Now select A2 (5kg) to D5 (16.5) Insert - Name - Create Select LEFT column To find the intersection enter =_15kg France The _15kg and France will be named ranges. "Kerry" wrote: I have a spreadsheet of data set up in excel something like this UK France Spain 5kg 5.00 10.00 15.00 10kg 6.00 12.00 16.00 15kg 7.00 13.00 16.25 20kg 8.00 15.00 16.50 I want to be able to type in a cell the county name and then in another cell the weight, and then create a formaula which gives me the price from the table above. ie if i want france at 15kg... then the answer would be 13.00 Is this possible? any help would be really appreciated |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Lookup formula in excel
Thanks toppers,
Kerry |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Lookup formula in excel
That should probably be:
=INDEX($B$2:$D$5,MATCH(F2,$A$2:$A$5,1),MATCH(F1,$B $1:$D$1,0)) Thus: The match-type in the first MATCH bit should be set to 1, not to 0. Toppers wrote: F2 contains weight (I ignored units) and F1 country. Change ranges to suit =INDEX($B$2:$D$5,MATCH(F2,$A$2:$A$5,0),MATCH(F1,$B $1:$D$1,0)) A B C D UK France Spain 5 5.00 10.00 15.00 '<=== Row 2 10 6.00 12.00 16.00 15 7.00 13.00 16.25 20 8.00 15.00 16.50 "Kerry" wrote: I have a spreadsheet of data set up in excel something like this UK France Spain 5kg 5.00 10.00 15.00 10kg 6.00 12.00 16.00 15kg 7.00 13.00 16.25 20kg 8.00 15.00 16.50 I want to be able to type in a cell the county name and then in another cell the weight, and then create a formaula which gives me the price from the table above. ie if i want france at 15kg... then the answer would be 13.00 Is this possible? any help would be really appreciated |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 97 formula doesn't work in Excel 2003 | Excel Discussion (Misc queries) | |||
Excel Lookup MATCH formula | Excel Discussion (Misc queries) | |||
Excel 2002 Lookup formula returning wrong results? | Excel Worksheet Functions | |||
Formula checking multiple worksheets | Excel Worksheet Functions | |||
vba 97 excel lookup formula | Excel Discussion (Misc queries) |