Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 271
Default Should I use VLOOKUP? IF? INDEX?

I have a column in a large spreadsheet called "warehouse". "Warehouse" (A2
thru A7500) can be one of 25 possible names (MOreturns, MOinv, MOjunk,
TXreturns, TX2returns, TXjunk, AZreturns, AZ2, etc.). I am inserting a column
(B) where I want the warehouse location to populate unless it is a "junk"
warehouse, i.e. if A2=MOreturns, B2=MO; if A3=TXreturns, B3=TX; if A4=AZjunk,
B4=blank...
I tried using INDEX to match a name list but since it's not a 1:1
relationship, I couldn't get it to work and for some reason my nested IF
function came back saying one of my values was the wrong data type (I
enclosed the text in " " so I'm not sure what the "wrong type" was).
Would a VLOOKUP function work best or a nested IF function? Please give an
example of the formula. Please be specific. Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 258
Default Should I use VLOOKUP? IF? INDEX?

Susan --

If it were me, I'd use VLOOKUP. Set up a little table with the warehouse
names in the left column, then the location in the next column. Then use the
VLOOKUP function to get it working in one cell, and then double-click on the
little square dot in the lower right corner of that dot to copy the formula
all the down to row 7500. Remember to make the reference cells in the
vlookup table absolute (with '$') so that all the rows look to the same small
range.

HTH

"Susan" wrote:

I have a column in a large spreadsheet called "warehouse". "Warehouse" (A2
thru A7500) can be one of 25 possible names (MOreturns, MOinv, MOjunk,
TXreturns, TX2returns, TXjunk, AZreturns, AZ2, etc.). I am inserting a column
(B) where I want the warehouse location to populate unless it is a "junk"
warehouse, i.e. if A2=MOreturns, B2=MO; if A3=TXreturns, B3=TX; if A4=AZjunk,
B4=blank...
I tried using INDEX to match a name list but since it's not a 1:1
relationship, I couldn't get it to work and for some reason my nested IF
function came back saying one of my values was the wrong data type (I
enclosed the text in " " so I'm not sure what the "wrong type" was).
Would a VLOOKUP function work best or a nested IF function? Please give an
example of the formula. Please be specific. Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Should I use VLOOKUP? IF? INDEX?

*Maybe* this entered in column B and copied down:

=IF(COUNTIF(A1,"*junk*"),"",LEFT(A1,2))


--
Biff
Microsoft Excel MVP


"Susan" wrote in message
...
I have a column in a large spreadsheet called "warehouse". "Warehouse" (A2
thru A7500) can be one of 25 possible names (MOreturns, MOinv, MOjunk,
TXreturns, TX2returns, TXjunk, AZreturns, AZ2, etc.). I am inserting a
column
(B) where I want the warehouse location to populate unless it is a "junk"
warehouse, i.e. if A2=MOreturns, B2=MO; if A3=TXreturns, B3=TX; if
A4=AZjunk,
B4=blank...
I tried using INDEX to match a name list but since it's not a 1:1
relationship, I couldn't get it to work and for some reason my nested IF
function came back saying one of my values was the wrong data type (I
enclosed the text in " " so I'm not sure what the "wrong type" was).
Would a VLOOKUP function work best or a nested IF function? Please give an
example of the formula. Please be specific. Thanks!



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 271
Default Should I use VLOOKUP? IF? INDEX?

Thanks for the help - the Lookup Table instructions on the Contextures
website filled in the blanks.
Susan


"pdberger" wrote:

Susan --

If it were me, I'd use VLOOKUP. Set up a little table with the warehouse
names in the left column, then the location in the next column. Then use the
VLOOKUP function to get it working in one cell, and then double-click on the
little square dot in the lower right corner of that dot to copy the formula
all the down to row 7500. Remember to make the reference cells in the
vlookup table absolute (with '$') so that all the rows look to the same small
range.

HTH

"Susan" wrote:

I have a column in a large spreadsheet called "warehouse". "Warehouse" (A2
thru A7500) can be one of 25 possible names (MOreturns, MOinv, MOjunk,
TXreturns, TX2returns, TXjunk, AZreturns, AZ2, etc.). I am inserting a column
(B) where I want the warehouse location to populate unless it is a "junk"
warehouse, i.e. if A2=MOreturns, B2=MO; if A3=TXreturns, B3=TX; if A4=AZjunk,
B4=blank...
I tried using INDEX to match a name list but since it's not a 1:1
relationship, I couldn't get it to work and for some reason my nested IF
function came back saying one of my values was the wrong data type (I
enclosed the text in " " so I'm not sure what the "wrong type" was).
Would a VLOOKUP function work best or a nested IF function? Please give an
example of the formula. Please be specific. Thanks!

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 271
Default Should I use VLOOKUP? IF? INDEX?

Tried this also - that's a nifty trick - I'll have to save it for future use!
Susan


"T. Valko" wrote:

*Maybe* this entered in column B and copied down:

=IF(COUNTIF(A1,"*junk*"),"",LEFT(A1,2))


--
Biff
Microsoft Excel MVP


"Susan" wrote in message
...
I have a column in a large spreadsheet called "warehouse". "Warehouse" (A2
thru A7500) can be one of 25 possible names (MOreturns, MOinv, MOjunk,
TXreturns, TX2returns, TXjunk, AZreturns, AZ2, etc.). I am inserting a
column
(B) where I want the warehouse location to populate unless it is a "junk"
warehouse, i.e. if A2=MOreturns, B2=MO; if A3=TXreturns, B3=TX; if
A4=AZjunk,
B4=blank...
I tried using INDEX to match a name list but since it's not a 1:1
relationship, I couldn't get it to work and for some reason my nested IF
function came back saying one of my values was the wrong data type (I
enclosed the text in " " so I'm not sure what the "wrong type" was).
Would a VLOOKUP function work best or a nested IF function? Please give an
example of the formula. Please be specific. Thanks!




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
vlookup / index / match? James Excel Worksheet Functions 5 February 7th 08 12:22 PM
VLOOKUP, INDEX, or ....? Mac Excel Worksheet Functions 1 October 15th 07 12:54 PM
Index,match, vlookup? ronnomad Excel Discussion (Misc queries) 0 December 12th 06 08:27 PM
INDEX? VLOOKUP? lloydyleg11 Excel Discussion (Misc queries) 2 November 14th 06 04:35 AM
Index Match Vlookup? IntricateFool Excel Discussion (Misc queries) 23 October 3rd 06 10:39 PM


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