Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default 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
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
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


All times are GMT +1. The time now is 07:05 PM.

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"