+ Reply to Thread
Results 1 to 6 of 6

get an answer based on a value?

Hybrid View

  1. #1
    Registered User
    Join Date
    12-26-2009
    Location
    Richmond, North Yorkshire
    MS-Off Ver
    2017
    Posts
    83

    get an answer based on a value?

    This is what I want to do.

    I want to tell Excel that, if a cell value is between 1 and 100, to enter one result in another cell.
    If the value is between 101 and 250, enter another result in that same cell.
    If the value is between 251 and 500 enter another result in that same cell and so on about another 12 times.
    Last edited by davidcrawt; 01-01-2010 at 09:10 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    re: get an answer based on a value?

    You could possibly use LOOKUP

    =LOOKUP(MAX(0,A1),{0,1,101,251,351,501},{"","A","B","C","D","E"})
    For a more tailored solution we would need more info - ie what is being "output" (rather than A,B etc...)
    Last edited by DonkeyOte; 01-01-2010 at 09:13 AM. Reason: too many values in result_vector example!

  3. #3
    Registered User
    Join Date
    12-26-2009
    Location
    Richmond, North Yorkshire
    MS-Off Ver
    2017
    Posts
    83

    re: get an answer based on a value?

    It's to work out UK posatge as follows:

    If the item weighs between 1 & 100 grams and is a 'Letter' the answer would be 0.30

    If the item weighs between 1 & 100 grams and is a 'Large Letter' the answer would be 0.47

    If the item weighs between 101 & 250 grams and is a 'Large Letter' the answer would be 0.76

    If the item weighs between 251 & 500 grams and is a 'Large Letter' the answer would be 1.04 etc. etc.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    re: get an answer based on a value?

    That's fine - so change A,B,C etc to 0.3, 0.47, 0.76 etc... in the example "A" is tied to 1 as "B" is tied to 101 and "C" is tied to 251 etc...

  5. #5
    Registered User
    Join Date
    12-26-2009
    Location
    Richmond, North Yorkshire
    MS-Off Ver
    2017
    Posts
    83

    re: get an answer based on a value?

    Yes, thanks, I worked that out and tried it and it works great.
    Thanks so much.
    Happy New Year

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: get an answer based on a value?

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

    Also,please take care with your Thread Titles- I have edited this one
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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