+ Reply to Thread
Results 1 to 6 of 6

again count for range greater than another

  1. #1
    Registered User
    Join Date
    08-17-2012
    Location
    cairo
    MS-Off Ver
    Excel 2010
    Posts
    17

    again count for range greater than another

    I've posted before the following question and get answer
    http://www.excelforum.com/excel-new-...html?p=2899206

    The problem now if some cell is empty and contains no number
    I want to exclude the whole row from counting

    using =SUMPRODUCT(--(B1:B5>A1:A5))

    if cell A5 is empty the answer is counting 1 and formula understanding that B5>A5 which is not true

    I want not to count the this case in formula

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,902

    Re: again count for range greater than another

    use:

    =SUMPRODUCT(--(B1:B5>A1:A5),--(A1:A5<>""))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    08-17-2012
    Location
    cairo
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: again count for range greater than another

    can I use this for both cases

    =SUMPRODUCT(--(B1:B5>A1:A5),--(A1:A5<>""),--(B1:B5<>""))

    Thanks so so much

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,902

    Re: again count for range greater than another

    sure, but I think you only need what I gave, as if B1:B5 is blank it will not be greater than A5, even if A5 is also blank.

  5. #5
    Registered User
    Join Date
    08-17-2012
    Location
    cairo
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: again count for range greater than another

    yes , thanks so much for your help

  6. #6
    Administrator arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,147

    Re: again count for range greater than another

    Besbesmany,

    It looks like your problem has been solved. This time, i will mark it [SOLVED] for you. Next time please ensure you do it for your threads.

    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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