A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

IF Statement or VLOOKUP



 
 
Thread Tools Display Modes
  #1  
Old June 1st, 2010, 05:59 PM posted to microsoft.public.excel.misc
HL
external usenet poster
 
Posts: 26
Default IF Statement or VLOOKUP

I don't know if I should use an IF statement or VLOOKUP but but i would like
to do the following:
IF A2=0073 THEN B2 = Sales
IF A3 = 0083 THEN B3 = District

Column A will contain information like: 0082, 0092, 0073, etc. Column B is
empty right now but i want to use a formula to insert the ID name based on
the ID listed in column A.

How do i do this?
  #2  
Old June 1st, 2010, 06:45 PM posted to microsoft.public.excel.misc
Luke M[_4_]
external usenet poster
 
Posts: 451
Default IF Statement or VLOOKUP

Assuming you have a table somewhere defining which code goes with which
label, you'll want to use:
=VLOOKUP(A2,Your_Table,2,FALSE)

The 3rd arguement defines which column within Your_Table to return (I'm
assuming you're using a 2-column wide table), and the 4th arguement tells
the function you want to find an exact match.

--
Best Regards,

Luke M
"HL" wrote in message
...
I don't know if I should use an IF statement or VLOOKUP but but i would
like
to do the following:
IF A2=0073 THEN B2 = Sales
IF A3 = 0083 THEN B3 = District

Column A will contain information like: 0082, 0092, 0073, etc. Column B is
empty right now but i want to use a formula to insert the ID name based on
the ID listed in column A.

How do i do this?



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:01 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.