+ Reply to Thread
Results 1 to 4 of 4

How can I get <,=, or > to work with ranges

Hybrid View

  1. #1
    Registered User
    Join Date
    02-01-2009
    Location
    Toronto, Canada
    MS-Off Ver
    Office 2003
    Posts
    7

    How can I get <,=, or > to work with ranges

    Hello I am a newbie here and I don't use excel a lot but help with the following is greatly needed;

    I have a small worksheet going where F25=F12+F14+15. With the value in F25 I need it to correspond with the following;
    0 - 250,000 $100
    250,001 - 500,000 $125
    500,001 - 750,000 $325
    750,001 - 1,000,000 $450
    1,000,001 - 1,250,000 $490
    1,250,001 - 1,500,000 $528
    1,500,001 - 1,750,000 $561
    1,750,001 - 2,000,000 $595
    2,000,001 - 2,500,000 $634
    2,500,001 - 3,000,000 $672


    and return the $value into cell G25.

    So if F12+F14+F15 =$40,000(and displayed in F25) I would want 100 to show in cell G25

    Thanks

    Chris

  2. #2
    Forum Contributor vandanavai's Avatar
    Join Date
    09-04-2006
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    256

    Re: How can I get <,=, or > to work with ranges

    Hello

    See formula in green coloured cell in attached file. Change value in Pink coloured cell and see result in green coloured cell.

    See if this is useful to u.
    Attached Files Attached Files

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

    Re: How can I get <,=, or > to work with ranges

    You don't specify if your reference table is stored anywhere physically in your workbook... below is an example with the ranges stored in a static array within the formula itself...

    =LOOKUP(SUM(F12,F14:F15),{0,250001,500001,750001,1000001,1250001,1500001,1750001,2000001,2500001},{100,125,325,450,490,528,561,595,634,672})
    The static vectors can be stored in a range of cells... eg were:

    0 to 2500001 values stored in Y1:Y10

    and corresponding values:

    100 to 672 stored in Z1:Z10

    the above would become:

    =LOOKUP(SUM(F12,F14:F15),Y1:Y10,Z1:Z10)
    Obviously it's a lot easier to alter the associated values if they reside within an actual range and the formulae is a lot simpler to follow.

    EDIT: royUK, Code tags used because forum software will (as advised) insert a spurious space not present within the formula itself.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How can I get <,=, or > to work with ranges

            0	$100
      250,001	$125
      500,001	$325
      750,001	$450
    1,000,001	$490
    1,250,001	$528
    1,500,001	$561
    1,750,001	$595
    2,000,001	$634
    2,500,001	$672
    You actually only need to list the start of each range. The next range start implicitly demonstrates where the previous range ended. So the VLOOKUP need only show:

    =VLOOKUP(F25,$A$1:$B$10,2)

    You can also put that lookup chart onto another sheet, perhaps a sheet where you list helper stuff and can then hide the sheet.

    =VLOOKUP(F25,Sheet12!$A$1:$B$10,2)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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