+ Reply to Thread
Results 1 to 8 of 8

Thread: Count lookup from low/high values

  1. #1
    Registered User
    Join Date
    10-20-2011
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    39

    Count lookup from low/high values

    Pretty Simple i hope.

    Heres a picture that should shed more light

    lookup example.jpg

    So i want to return the value in G7. It is the count of the range from E7:F7

    is vlookup what im after?

    Thanks

  2. #2
    Valued Forum Contributor
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    1,957

    Re: Count lookup from low/high values

    I think you want =(MATCH(F7,J:J,0)-MATCH(E7,J:J,0))+1

    As an aside, please post example workbooks, not jpeg images - nobody wants to have to retype your data to test their formula.
    Last edited by Andrew-R; 02-03-2012 at 06:12 AM. Reason: Plus, not minus!

  3. #3
    Valued Forum Contributor Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens Greece
    MS-Off Ver
    Excel 2003
    Posts
    2,297

    Re: Count lookup from low/high values

    Hi

    Would you like to test this??

    =(F7-E7)*2+1


    Hope to helps you.
    Regards

    Fotis.

    I am proud that i am Greek.

    Just to know every one.We Greeks, we are nοt proud of our politicians. Υou?

    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.


    My Avadar picture, is from Athens Acropolis.
    http://www.theacropolismuseum.gr

    http://www.visitgreece.gr/

  4. #4
    Registered User
    Join Date
    10-20-2011
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    39

    Re: Count lookup from low/high values

    Thanks,

    Sorry it wasn't working before (the up-loader)

    Heres the sheet its slightly different from the jpeg and has increments.

    Thanks
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-20-2011
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    39

    Question Re: Count lookup from low/high values

    Still struggling with this formula

  6. #6
    Registered User
    Join Date
    10-20-2011
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    39

    Re: Count lookup from low/high values

    Should this be done in VBA then?

  7. #7
    Valued Forum Contributor
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    1,957

    Re: Count lookup from low/high values

    I'm puzzled as to why my original formula didn't work. It seems that adding 0.1 to the previous value returns a number which isn't exactly equal to x+0.1

    This formula does work:

    =(MATCH(F3,ROUND($J$1:$J$100,1),0)-MATCH(E3,ROUND($J$1:$J$100,1),0))+1

    However, this is an array formula, so it must be entered using Ctrl-Shift-Enter, not just enter.

  8. #8
    Registered User
    Join Date
    10-20-2011
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    39

    Re: Count lookup from low/high values

    This Works thanks a lot.


    I may encounter a problem like so (attached) in the future and it would be great if i could work around it but for now this is great.

    The problem in "example 5" is that currently it does not round up.

    lookupsteps2.xlsx

+ 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.2.0