Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formula help please
I'm sure this is very simple but I cannot figure it out.
I have one column with a number code. Instead of that number code, I want it to be what the code stands for. What kind of forumula can I write for this? If I can't do it within the same column, I can accept doing it in another column and copying and pasting. Any suggestions would be greatly appreciated. Thank you Shawna |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formula help please
Hi Shawna
don't think you can do it in the same column as code, but if you have a table with the code in the first column & the data that you want to substitute for it in another column you can use the VLOOKUP function e.g. your "lookup" table - assume on sheet2 A B 1 Code Info 2 AAA Animals 3 BBB Birds the sheet where you want the related data to appear A B 1 BBB - want "Birds" here therefore in B1 you can type =VLOOKUP(A1,Sheet2!$A$2:$B$3,2,0) this says, lookup the value in A1, in the table in sheet2 and return the information from the 2nd column where there is an exact match Hope this helps Cheers JulieD "Shawna" wrote in message ... I'm sure this is very simple but I cannot figure it out. I have one column with a number code. Instead of that number code, I want it to be what the code stands for. What kind of forumula can I write for this? If I can't do it within the same column, I can accept doing it in another column and copying and pasting. Any suggestions would be greatly appreciated. Thank you Shawna |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formula help please
sorry forgot to mention that if there is no data in A1 of sheet 1 (where the
VLOOKUP is) the VLOOKUP will return #NA, to supress this adjust the formula as follows =IF(ISNA(VLOOKUP(A1,Sheet2!$A$2:$B$3,2,0)),"",VLOO KUP(A1,Sheet2!$A$2:$B$3,2,0)) Cheers JulieD "JulieD" wrote in message ... Hi Shawna don't think you can do it in the same column as code, but if you have a table with the code in the first column & the data that you want to substitute for it in another column you can use the VLOOKUP function e.g. your "lookup" table - assume on sheet2 A B 1 Code Info 2 AAA Animals 3 BBB Birds the sheet where you want the related data to appear A B 1 BBB - want "Birds" here therefore in B1 you can type =VLOOKUP(A1,Sheet2!$A$2:$B$3,2,0) this says, lookup the value in A1, in the table in sheet2 and return the information from the 2nd column where there is an exact match Hope this helps Cheers JulieD "Shawna" wrote in message ... I'm sure this is very simple but I cannot figure it out. I have one column with a number code. Instead of that number code, I want it to be what the code stands for. What kind of forumula can I write for this? If I can't do it within the same column, I can accept doing it in another column and copying and pasting. Any suggestions would be greatly appreciated. Thank you Shawna |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formula help please
Also, your table has to be sorted.
-----Original Message----- sorry forgot to mention that if there is no data in A1 of sheet 1 (where the VLOOKUP is) the VLOOKUP will return #NA, to supress this adjust the formula as follows =IF(ISNA(VLOOKUP(A1,Sheet2!$A$2:$B$3,2,0)),"",VLO OKUP (A1,Sheet2!$A$2:$B$3,2,0)) Cheers JulieD "JulieD" wrote in message ... Hi Shawna don't think you can do it in the same column as code, but if you have a table with the code in the first column & the data that you want to substitute for it in another column you can use the VLOOKUP function e.g. your "lookup" table - assume on sheet2 A B 1 Code Info 2 AAA Animals 3 BBB Birds the sheet where you want the related data to appear A B 1 BBB - want "Birds" here therefore in B1 you can type =VLOOKUP(A1,Sheet2!$A$2:$B$3,2,0) this says, lookup the value in A1, in the table in sheet2 and return the information from the 2nd column where there is an exact match Hope this helps Cheers JulieD "Shawna" wrote in message ... I'm sure this is very simple but I cannot figure it out. I have one column with a number code. Instead of that number code, I want it to be what the code stands for. What kind of forumula can I write for this? If I can't do it within the same column, I can accept doing it in another column and copying and pasting. Any suggestions would be greatly appreciated. Thank you Shawna . |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formula help please
Hi Kevin
not necessary as the match is an exact match (fourth parameter of VLOOKUP = 0 or FALSE) if the fourth parameter is omitted, =1 or is TRUE then it needs to be sorted Cheers JulieD "Kevin" wrote in message ... Also, your table has to be sorted. -----Original Message----- sorry forgot to mention that if there is no data in A1 of sheet 1 (where the VLOOKUP is) the VLOOKUP will return #NA, to supress this adjust the formula as follows =IF(ISNA(VLOOKUP(A1,Sheet2!$A$2:$B$3,2,0)),"",VL OOKUP (A1,Sheet2!$A$2:$B$3,2,0)) Cheers JulieD "JulieD" wrote in message .. . Hi Shawna don't think you can do it in the same column as code, but if you have a table with the code in the first column & the data that you want to substitute for it in another column you can use the VLOOKUP function e.g. your "lookup" table - assume on sheet2 A B 1 Code Info 2 AAA Animals 3 BBB Birds the sheet where you want the related data to appear A B 1 BBB - want "Birds" here therefore in B1 you can type =VLOOKUP(A1,Sheet2!$A$2:$B$3,2,0) this says, lookup the value in A1, in the table in sheet2 and return the information from the 2nd column where there is an exact match Hope this helps Cheers JulieD "Shawna" wrote in message ... I'm sure this is very simple but I cannot figure it out. I have one column with a number code. Instead of that number code, I want it to be what the code stands for. What kind of forumula can I write for this? If I can't do it within the same column, I can accept doing it in another column and copying and pasting. Any suggestions would be greatly appreciated. Thank you Shawna . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Commenting custom formula fields/formula on formula editor | Excel Programming |