+ Reply to Thread
Results 1 to 6 of 6

=lookup help

Hybrid View

  1. #1
    Registered User
    Join Date
    01-11-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    44

    =lookup help

    hi i need to basically look at a cell and put this forumla into cell A3

    if the number in cell A1 falls between 1-3.9 put number 0
    if the number in cell A1 falls between 4-9.9 put number 1
    if the number in cell A1 falls between 10-19.99 put number 2
    if the number in cell A1 is 20+ put number 3

    i can use it with whole numbers but not with ranges

    can anyone help??


    Thanks

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: =lookup help

    try this one

    =LOOKUP(A1,{0,0;4,1;10,2;20,3})
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Forum Contributor
    Join Date
    05-04-2014
    Location
    New Jersey, United States
    MS-Off Ver
    Excel 2010, 2013
    Posts
    120

    Re: =lookup help

    Quote Originally Posted by rexy69 View Post
    hi i need to basically look at a cell and put this forumla into cell A3

    if the number in cell A1 falls between 1-3.9 put number 0
    if the number in cell A1 falls between 4-9.9 put number 1
    if the number in cell A1 falls between 10-19.99 put number 2
    if the number in cell A1 is 20+ put number 3

    i can use it with whole numbers but not with ranges

    can anyone help??


    Thanks
    Assuming you mean 1-3.999999......
    and 4-9.99999999......
    etc

    as opposed to the non-repeating numbers you posted, this may work (put it in A3):

    =LOOKUP(A1,{1,4,10,20},{0,1,2,3})

  4. #4
    Forum Contributor
    Join Date
    02-12-2011
    Location
    Hyderabad
    MS-Off Ver
    Excel 2016
    Posts
    270

    Re: =lookup help

    Hi
    See below and check if this helps , may be an alternative to lookup

    =IF(AND(A1>=1, A1<=3.9),0,
    IF(AND(A1>=4, A1<=9.9),1,
    IF(AND(A1>=10,A1<=19.99),2,3))
    Never confuse a single defeat to the final defeat.

  5. #5
    Forum Contributor
    Join Date
    05-04-2014
    Location
    New Jersey, United States
    MS-Off Ver
    Excel 2010, 2013
    Posts
    120

    Re: =lookup help

    Careful with the if statement option. Entering a value of "9.99" or a "3.95" for example will result in a "3". It should be more along the lines of:

    =IF(AND(A1>=1,A1<4),0,IF(AND(A1>=4,A1<10),1,IF(AND(A1>=10,A1<20),2,3))
    Last edited by clabulis; 09-06-2014 at 01:00 PM.

  6. #6
    Registered User
    Join Date
    01-11-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    44

    Re: =lookup help

    thanks for all the responses, just tried Clabulis' method and it worked perfectly

    Many Thanks!!!!!1

    REP+

+ 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. Replies: 3
    Last Post: 04-08-2014, 03:11 AM
  2. Replies: 2
    Last Post: 05-19-2013, 08:46 AM
  3. Replies: 1
    Last Post: 11-07-2012, 01:57 PM
  4. Search lookup array to find lookup value contained within text string
    By Cookstein2 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-02-2011, 09:42 AM
  5. Replies: 7
    Last Post: 06-19-2011, 12:51 PM

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