Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I am trying to create a formula that searches for text in a column and
returns a matching number based on the text that is entered in that cell. A portion of the formula that I created is below where my real list is 19 rows long, which is why I can't use the IF formula. =LOOKUP(D13,{EUE,NUE,STC,LTC},{"0150","0151","0152 ","0153"}) When I enter this formula and check the function, the LOOKUP_Vector reads "Invalid". I have used the same formula with success in the same workbook, but the look-up vector is numbers instead of text. Any suggestions? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
put quote marks around the text
=LOOKUP(D13,{"EUE","NUE","STC","LTC"},{"0150","015 1","0152","0153"}) will work "cstruthers" wrote: I am trying to create a formula that searches for text in a column and returns a matching number based on the text that is entered in that cell. A portion of the formula that I created is below where my real list is 19 rows long, which is why I can't use the IF formula. =LOOKUP(D13,{EUE,NUE,STC,LTC},{"0150","0151","0152 ","0153"}) When I enter this formula and check the function, the LOOKUP_Vector reads "Invalid". I have used the same formula with success in the same workbook, but the look-up vector is numbers instead of text. Any suggestions? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
=LOOKUP(D13,{EUE,NUE,STC,LTC},{"0150","0151","0152 ","0153"})
The lookup_vector must be sorted ascending and you're missing " ": =LOOKUP(D13,{"EUE","LTC","NUE","STC"},{"0150","015 1","0152","0153"}) If you have 19 pairs of data you'd be better off making a lookup table on your sheet and referring to that table rather than hardcoding all that into a formula. Biff "cstruthers" wrote in message ... I am trying to create a formula that searches for text in a column and returns a matching number based on the text that is entered in that cell. A portion of the formula that I created is below where my real list is 19 rows long, which is why I can't use the IF formula. =LOOKUP(D13,{EUE,NUE,STC,LTC},{"0150","0151","0152 ","0153"}) When I enter this formula and check the function, the LOOKUP_Vector reads "Invalid". I have used the same formula with success in the same workbook, but the look-up vector is numbers instead of text. Any suggestions? |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks for this. What would the code look like for referring to a table
rather than hardcoding my 19 pieces of data? "T. Valko" wrote: =LOOKUP(D13,{EUE,NUE,STC,LTC},{"0150","0151","0152 ","0153"}) The lookup_vector must be sorted ascending and you're missing " ": =LOOKUP(D13,{"EUE","LTC","NUE","STC"},{"0150","015 1","0152","0153"}) If you have 19 pairs of data you'd be better off making a lookup table on your sheet and referring to that table rather than hardcoding all that into a formula. Biff "cstruthers" wrote in message ... I am trying to create a formula that searches for text in a column and returns a matching number based on the text that is entered in that cell. A portion of the formula that I created is below where my real list is 19 rows long, which is why I can't use the IF formula. =LOOKUP(D13,{EUE,NUE,STC,LTC},{"0150","0151","0152 ","0153"}) When I enter this formula and check the function, the LOOKUP_Vector reads "Invalid". I have used the same formula with success in the same workbook, but the look-up vector is numbers instead of text. Any suggestions? |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
if your text were in C20 through C40
and the associated numbers in D20 through D40 try =vlookup(D13,C20:D40,2) "cstruthers" wrote: Thanks for this. What would the code look like for referring to a table rather than hardcoding my 19 pieces of data? "T. Valko" wrote: =LOOKUP(D13,{EUE,NUE,STC,LTC},{"0150","0151","0152 ","0153"}) The lookup_vector must be sorted ascending and you're missing " ": =LOOKUP(D13,{"EUE","LTC","NUE","STC"},{"0150","015 1","0152","0153"}) If you have 19 pairs of data you'd be better off making a lookup table on your sheet and referring to that table rather than hardcoding all that into a formula. Biff "cstruthers" wrote in message ... I am trying to create a formula that searches for text in a column and returns a matching number based on the text that is entered in that cell. A portion of the formula that I created is below where my real list is 19 rows long, which is why I can't use the IF formula. =LOOKUP(D13,{EUE,NUE,STC,LTC},{"0150","0151","0152 ","0153"}) When I enter this formula and check the function, the LOOKUP_Vector reads "Invalid". I have used the same formula with success in the same workbook, but the look-up vector is numbers instead of text. Any suggestions? |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks Sooooo Much! This helped me a ton!
"bj" wrote: if your text were in C20 through C40 and the associated numbers in D20 through D40 try =vlookup(D13,C20:D40,2) "cstruthers" wrote: Thanks for this. What would the code look like for referring to a table rather than hardcoding my 19 pieces of data? "T. Valko" wrote: =LOOKUP(D13,{EUE,NUE,STC,LTC},{"0150","0151","0152 ","0153"}) The lookup_vector must be sorted ascending and you're missing " ": =LOOKUP(D13,{"EUE","LTC","NUE","STC"},{"0150","015 1","0152","0153"}) If you have 19 pairs of data you'd be better off making a lookup table on your sheet and referring to that table rather than hardcoding all that into a formula. Biff "cstruthers" wrote in message ... I am trying to create a formula that searches for text in a column and returns a matching number based on the text that is entered in that cell. A portion of the formula that I created is below where my real list is 19 rows long, which is why I can't use the IF formula. =LOOKUP(D13,{EUE,NUE,STC,LTC},{"0150","0151","0152 ","0153"}) When I enter this formula and check the function, the LOOKUP_Vector reads "Invalid". I have used the same formula with success in the same workbook, but the look-up vector is numbers instead of text. Any suggestions? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
LOOKUP a text string created from IF statement | Excel Discussion (Misc queries) | |||
Another way to lookup data | Excel Worksheet Functions | |||
Lookup Vector > Lookup Value | Excel Worksheet Functions | |||
Lookup function w/Text and Year | Excel Worksheet Functions | |||
double lookup, nest, or macro? | Excel Worksheet Functions |