+ Reply to Thread
Results 1 to 6 of 6

if then or vlook up

Hybrid View

denfan if then or vlook up 10-03-2014, 01:28 PM
ConneXionLost Re: if then or vlook up 10-03-2014, 01:45 PM
mcmahobt Re: if then or vlook up 10-03-2014, 01:48 PM
Speshul Re: if then or vlook up 10-03-2014, 01:53 PM
BoogieMan Re: if then or vlook up 10-03-2014, 03:41 PM
ConneXionLost Re: if then or vlook up 10-03-2014, 04:03 PM
  1. #1
    Registered User
    Join Date
    11-09-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    27

    if then or vlook up

    I am wondering what my best option is... I want a column to auto fill with a specific word, but i have 21 different options and it would need to fall in a range of numbers to determin which one to use,...
    So for example if column A is between W100 and W 199 then i want the word Families in the field. If if falls between W200 and W250 thenI want the word Shelter in the field. I thought i could use If then - but i dont think i can have 21 nested if thens. Any suggestions? would Vlook up work?

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: if then or vlook up

    Yes, build a lookup table and use VLOOKUP.
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: if then or vlook up

    See my attached as an example. As far as my formula goes, you'd need a second column to reference the cell you have your "W###" data in. Or, you could always copy the data and paste it into the formula found in the range B6:B13, but this is a first stab at a solution. Let me know if it works out for you.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: if then or vlook up

    Technically you can nest 64 IF's in XL2010 I think, but that wouldn't be fun to write.

    Build a table and use VLOOKUP is your best option. If you really don't want to make a table you can write a table into a named range,

    This saved as a Named Range (Formulas tab, Name manager)
    ={100,"Apple";200,"Orange";300,"Banana";400,"Grape";500,"OPTIMUSPRIME"}
    When you reference the named range it will be looking at something like this:

    100	Apple
    200	Orange
    300	Banana
    400	Grape
    500	OPTIMUSPRIME
    So if you made the above a named range called "fruit", the vlookup would look like
    =VLOOKUP(A1,fruit,2,1)

    If A1 is 1, it will return Apple
    if A1 is 10, it will return Apple
    if A1 is 101, it will return Orange
    if A1 is 99999, it will return OPTIMUSPRIME



    EDIT
    On second thoughts, this is easier

    Change as needed


    =LOOKUP(N(RIGHT(A6,3)),{0,100,200,300,400},{"One","Two","Three","Four","Five"})


    0-99 = "One"
    100-199 = "Two"

    And so on.
    Last edited by Speshul; 10-03-2014 at 02:00 PM.
    You should hit F5, because chances are I've edited this post at least 5 times.
    Example of Array Formulas
    Quote Originally Posted by Jacc View Post
    Sorry, your description makes no sense. I just made some formula that looks interesting cause I had nothing else to do.
    Click the * below on any post that helped you.

  5. #5
    Registered User
    Join Date
    10-03-2014
    Location
    United States
    MS-Off Ver
    Office 2013
    Posts
    3

    Re: if then or vlook up

    I have a similar question but I would like to build several tables that can be referenced depending on a string. For Example: If A1 = Backhoe, then B1 =[list_of_backhoe_equipment#'s] where the list of equipment numbers would be a drop down list of only backhoe equipment numbers. Is this possible? Thanks,

    BoogieMan

  6. #6
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: if then or vlook up

    Boogieman,

    Please don't hijack threads, it's against the rules.

    Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Vlook Up
    By Merlin54k in forum Excel General
    Replies: 1
    Last Post: 02-11-2011, 01:40 PM
  2. vlook up
    By arcticale in forum Excel General
    Replies: 1
    Last Post: 01-25-2006, 05:40 PM
  3. #N/A with Vlook up
    By Guy Wates in forum Excel General
    Replies: 1
    Last Post: 10-14-2005, 09:02 AM
  4. If with Vlook up
    By souchie40 in forum Excel General
    Replies: 3
    Last Post: 09-09-2005, 03:05 PM
  5. [SOLVED] vlook up
    By Sean in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1