+ Reply to Thread
Results 1 to 3 of 3

Greater than and Less than in one formula

  1. #1
    Registered User
    Join Date
    03-13-2010
    Location
    Bedfordshire, England
    MS-Off Ver
    Excel 2010
    Posts
    60

    Greater than and Less than in one formula

    I am using the following formula in a worksheet

    Please Login or Register  to view this content.
    some cells in the range B6:B45 are 0 (zero) but I want the formula to ignore these. I have been trying to write a formula based on the above one that only counts cells less than 1 but greater than 0.00001.

    Any ideas?

    I'm really struggling. Any help greatfully received.

  2. #2
    Valued Forum Contributor
    Join Date
    07-17-2005
    Location
    Abergavenny, Wales, UK
    MS-Off Ver
    XL2003, XL2007, XL2010, XL2013, XL2016
    Posts
    608

    Re: Greater than and Less than in one formula

    Hi

    You are using 2 different columns in your testing
    Try
    =SUMPRODUCT(--($A$6:$A$45<>""),--(A$6:A$45<1))

    or
    =SUMPRODUCT(--($A$6:$A$45>0),--(B$6:B$45<1))
    --
    Regards
    Roger Govier
    Microsoft Excel MVP

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

    Re: Greater than and Less than in one formula

    So you really have three conditions:

    =SUMPRODUCT(--($A$6:$A$45<>""), --(B$6:B$45<1), --(B$6:B$45>0))
    _________________
    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)

Tags for this Thread

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