+ Reply to Thread
Results 1 to 4 of 4

"IF" calculation for a range of numbers (not cells)

  1. #1
    Registered User
    Join Date
    09-22-2007
    Posts
    2

    "IF" calculation for a range of numbers (not cells)

    "A2" returns various numbers and I want "A3" to calculate based off of an "IF" statement - however, I cannot figure this out. I did look at the Excel Help and
    tried different variations of the "comparison operators" to no avail.

    IF A2 = 1-8, then value = 1
    IF A2 = 9-16, then value = 2
    IF A2 = 17-24, then value = 3

    Thanks,
    ~ Sean
    Last edited by tsmanz; 09-22-2007 at 04:25 PM.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Maybe

    =LOOKUP(A2,{0,9,17},{1,2,3})

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    =int((a2-1)/8)+1

  4. #4
    Registered User
    Join Date
    09-22-2007
    Posts
    2
    Thank you very much.
    ~ Sean

+ 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