+ Reply to Thread
Results 1 to 8 of 8

How to use ranges of numbers for assigning specified values

  1. #1
    Registered User
    Join Date
    04-24-2017
    Location
    Berlin. Germany
    MS-Off Ver
    Office 2015
    Posts
    19

    How to use ranges of numbers for assigning specified values

    Hi,

    I need to assign a specific number of required hours for each range of numbers.

    Basically, my Excel looks like this:
    Column A:
    0-100
    101-200
    201-300
    etc.

    And next to column A, I wrote down values such as 1 to denote the number of hours required if the lookup value is between 0-100 etc.

    Now I know about a possible workaround by using the vlookup function, but for this I would need to create kind of a mapping table, ideally on a separate tab in order to avoid clutter, that will list all single numbers that are relevant for the range (in fact 10.000 is the relevant maximum range, thus I would need to use 10.000 excel line entries). I want to avoid that and instead go with numeric ranges as described above.

    Any idea how I could realize that with an excel function? VBA would not be my cup of tea.

    Regards
    Kian

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: How to use ranges of numbers for assigning specified values

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How to use ranges of numbers for assigning specified values

    Please upload a workbook or a representative cut down copy, anonymised if necessary. It is always easier to advise if we can see your request in its context.

    Show a before and after situation with manually calculated results, explaining which information is data and which is results, and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: How to use ranges of numbers for assigning specified values

    you dont need to list all the numbers just the range
    0
    100
    200
    300

    etc

    then use a vlookup with a TRUE and it will look at the lowest nearest value
    so if against 0 you had 1 and next to 100 you had 2

    anything between 0 and 99 would return the 1
    anything between 100 and 199 would return a 2

    also Excel will series a list
    so you should be able to just copy down - still would be 100 rows
    10,000 divided by 100 as they are multiples of 100
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  5. #5
    Registered User
    Join Date
    04-24-2017
    Location
    Berlin. Germany
    MS-Off Ver
    Office 2015
    Posts
    19

    Re: How to use ranges of numbers for assigning specified values

    Understood. Please find my request as requested attached
    Attached Files Attached Files

  6. #6
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: How to use ranges of numbers for assigning specified values

    As suggested
    change the table slightly and use a TRUE vlookup
    Attached Files Attached Files

  7. #7
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: How to use ranges of numbers for assigning specified values

    See attached workbook
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    04-24-2017
    Location
    Berlin. Germany
    MS-Off Ver
    Office 2015
    Posts
    19

    Re: How to use ranges of numbers for assigning specified values

    guys, you are awesome. thanks for helping! the solution works

+ 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. VBA Programming, Assigning Values using Ranges
    By jhcoleman53 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-07-2013, 04:19 PM
  2. Assigning numbers into a list of ranges
    By siuchung in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-28-2007, 03:50 PM
  3. [SOLVED] Assigning ranges for values (e.g., $1,005 the range is ">$1K to 5K
    By jennifer in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 PM
  4. Assigning ranges for values (e.g., $1,005 the range is ">$1K to 5K
    By jennifer in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 11:05 AM
  5. [SOLVED] Assigning ranges for values (e.g., $1,005 the range is ">$1K to 5K
    By jennifer in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  6. Assigning ranges for values (e.g., $1,005 the range is ">$1K to 5K
    By Arvi Laanemets in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2005, 07:05 AM
  7. Assigning ranges for values (e.g., $1,005 the range is ">$1K to 5K
    By jennifer in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  8. Assigning ranges for values (e.g., $1,005 the range is ">$1K to 5K
    By jennifer in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 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