#1   Report Post  
Posted to microsoft.public.excel.misc
Jax Jax is offline
external usenet poster
 
Posts: 8
Default Lookup query

I am a bit rusy with LOOKUP and much better on IF statements. My problem is
I have 14 conditions to consider and IF will only go up to 7. Here's what I
want to say:
1c is equal to 7 points
1b " 9 "
1a 11
2c 13
2b 15
2a 17
3c 19
3b 21
3a 23
4c 25
4b 27
4a 29
5c 31
5b 33
Any one of the above number letter score could go in the required field so
they all have to be in the formula. If I type say 4b into a box I want the
number 25 to appear in the answer.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 168
Default Lookup query

can you setup the table you just made below in a separate area of the
worksheet and then use vlookup to return your result? Just make sure the
list is sorted (so 1a is first, 1b is next, etc.) and vlookup should do the
trick.
--
Please remember to indicate when the post is answered so others can benefit
from it later.


"Jax" wrote:

I am a bit rusy with LOOKUP and much better on IF statements. My problem is
I have 14 conditions to consider and IF will only go up to 7. Here's what I
want to say:
1c is equal to 7 points
1b " 9 "
1a 11
2c 13
2b 15
2a 17
3c 19
3b 21
3a 23
4c 25
4b 27
4a 29
5c 31
5b 33
Any one of the above number letter score could go in the required field so
they all have to be in the formula. If I type say 4b into a box I want the
number 25 to appear in the answer.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default Lookup query

=IF(A2="","",VLOOKUP(A2,MyTable,2,0))

where A2 is the cell you put the value in and MyTable a 2x2 column table
just as you posted

or hardcoded

=IF(A2="","",VLOOKUP(A2,{"1c",7;"1b",9;"1a",11;"2c ",13;"2b",15;"2a",17;"3c",19;"3b",21;"3a",23;"4c", 25;"4b",27;"4a",29;"5c",31;"5b",33},2,0))



--


Regards,


Peo Sjoblom





"Jax" wrote in message
...
I am a bit rusy with LOOKUP and much better on IF statements. My problem
is
I have 14 conditions to consider and IF will only go up to 7. Here's
what I
want to say:
1c is equal to 7 points
1b " 9 "
1a 11
2c 13
2b 15
2a 17
3c 19
3b 21
3a 23
4c 25
4b 27
4a 29
5c 31
5b 33
Any one of the above number letter score could go in the required field so
they all have to be in the formula. If I type say 4b into a box I want
the
number 25 to appear in the answer.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Lookup query

You can calculate it (i.e. no need for a table) with this formula:

=6*LEFT(A2,1)+2*(68-CODE(UPPER(RIGHT(A2,1))))-1

where A2 is the cell you put your values in.

Hope this helps.

Pete


"Jax" wrote:

I am a bit rusy with LOOKUP and much better on IF statements. My problem is
I have 14 conditions to consider and IF will only go up to 7. Here's what I
want to say:
1c is equal to 7 points
1b " 9 "
1a 11
2c 13
2b 15
2a 17
3c 19
3b 21
3a 23
4c 25
4b 27
4a 29
5c 31
5b 33
Any one of the above number letter score could go in the required field so
they all have to be in the formula. If I type say 4b into a box I want the
number 25 to appear in the answer.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Lookup query

By the way, I think you would want 27 to appear if you type 4b into your cell.

Pete

"Pete_UK" wrote:

You can calculate it (i.e. no need for a table) with this formula:

=6*LEFT(A2,1)+2*(68-CODE(UPPER(RIGHT(A2,1))))-1

where A2 is the cell you put your values in.

Hope this helps.

Pete


"Jax" wrote:

I am a bit rusy with LOOKUP and much better on IF statements. My problem is
I have 14 conditions to consider and IF will only go up to 7. Here's what I
want to say:
1c is equal to 7 points
1b " 9 "
1a 11
2c 13
2b 15
2a 17
3c 19
3b 21
3a 23
4c 25
4b 27
4a 29
5c 31
5b 33
Any one of the above number letter score could go in the required field so
they all have to be in the formula. If I type say 4b into a box I want the
number 25 to appear in the answer.

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
Possible lookup query - XL2003 Steve Jones Excel Discussion (Misc queries) 0 July 24th 06 10:24 AM
Lookup query in excel LM Excel Worksheet Functions 2 May 29th 06 04:31 PM
stock quote lookup query for Excel 2000 cyclist4444 Excel Worksheet Functions 0 February 4th 06 06:13 PM
Help please! Lookup/Index query. JaB Excel Discussion (Misc queries) 1 November 11th 05 11:49 AM
Matrix Query Part II - lookup value Krista F Excel Worksheet Functions 1 April 6th 05 02:18 PM


All times are GMT +1. The time now is 06:45 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"