+ Reply to Thread
Results 1 to 3 of 3

Populate Cell Based on Where Number Falls into Range

  1. #1
    Registered User
    Join Date
    10-03-2012
    Location
    SF
    MS-Off Ver
    Excel for Mac 2011 Version 14.2.4
    Posts
    4

    Question Populate Cell Based on Where Number Falls into Range

    I am trying to write a formula whereby if a number falls into a range, then I populate the cell with a text label.

    For example, if a number equals zero then the cell populates with the text 0. If the number is between 0-50, then the cell populates with the text 0-50. If the number is greater than 50 but less than or equal to 100, then the cell populates with the text 50-100....and so on. I have approximately 20 number ranges.

    No laughing but I started writing something like the following and not only am I writing it incorrectly, it seems like a very long way about it. I'm sure there's a much more elegant way to think about this. I'd be grateful for any help.

    =IF(J150216=0,"0",IF(J150216>0<=50,"Less Than 50",IF(J150216>50<=100,"50-100",IF(J150216>100<=150,"100-150",IF(J150216>150<=200,"150-200",IF(J150216>200<=250,"200-250",IF(J150216>250<=300,"250-300",IF(J150216>300,"Greater Than 300"))))))))

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Populate Cell Based on Where Number Falls into Range

    The better way would be to construct a Lookup table.

    http://www.contextures.com/xlFunctions02.html

    Or look in Excel help at the tutorials for VLOOKUP and LOOKUP
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    10-03-2012
    Location
    SF
    MS-Off Ver
    Excel for Mac 2011 Version 14.2.4
    Posts
    4

    Re: Populate Cell Based on Where Number Falls into Range

    thank you - will do

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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