Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
HL HL is offline
external usenet poster
 
Posts: 8
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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 457
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?



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
If & Vlookup statement Sarah Excel Worksheet Functions 3 April 16th 10 08:13 PM
Vlookup, if statement, maybe an and statement Jennifer Excel Discussion (Misc queries) 1 February 26th 10 03:30 AM
Not sure whether to use VLOOKUP or an IF statement Allison1962 Excel Worksheet Functions 2 February 2nd 09 09:21 PM
If Statement with VLookup Shams Excel Worksheet Functions 3 October 16th 06 07:16 PM
Vlookup or If statement Help JPriest Excel Worksheet Functions 7 June 28th 05 08:00 PM


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