+ Reply to Thread
Results 1 to 5 of 5

Cannot get values in column B to be values for ranges in column A

  1. #1
    Registered User
    Join Date
    09-17-2011
    Location
    New Jersey
    MS-Off Ver
    Excel 2003
    Posts
    21

    Cannot get values in column B to be values for ranges in column A

    In column A I have number of people which ranges from 1 to i think the highest is 92. In column B I want to assign a value if the column A number falls within a range. Like if the value in column A falls within 1 to 6 range I want to give it a value of x in column B. If the column A value falls within a range of 7 to 15 I want to give it a value of y in column B. Anybody know how to accomplish this?
    Last edited by JoseK70; 09-19-2011 at 10:25 AM.

  2. #2
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Ranges

    Hi,

    You can do it like this.

    Please Login or Register  to view this content.
    Steffen Thomsen

  3. #3
    Registered User
    Join Date
    09-17-2011
    Location
    New Jersey
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: Ranges

    Thanks for responding but for some reason a "compile error" is occuring for the if statement and elseif statement.

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Ranges

    hi, JoseK70 and Steffen Thomsen, try to change compare line like this and it will work:

    Please Login or Register  to view this content.
    same for the other line

  5. #5
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Cannot get values in column B to be values for ranges in column A

    Hi watersev,

    Thanks for the correction, was just a bit to fast with the reply i think.

    Steffen Thomsen

+ 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