Question:

Excel question? how to count blanks depending on another cell?

by  |  earlier

0 LIKES UnLike

i need to count the number of non-blank cells if a certain condition is true.

so =if(A1:A25>2,counta(B1:B25))

or something like that, not sure if im making any sense my head is fried.

so again count all the non-blank cells in a range if a condition occurs in another

 Tags:

   Report

3 ANSWERS


  1. i skipped the the original question, because of the 1st part of the formula.

    based on the additional details.

    you want to count column B only if column A has a Y

    then try you can use the sumproduct() formula

    =SUMPRODUCT((A1:A5="Y")*(B1:B5=1))

    if you have excel2007 then you can use the countifs() formula.

    edit-

    now that i think about it...

    if you have numbers in Column A, and you want it to look more like your original...then

    =SUMPRODUCT((A1:A25>2)*(B1:B25>0))

    i guess that did make sense after all.


  2. I'm not sure what your first condition is doing (A1:A25>2) but if that condition is correct then your IF stmt is pretty much correct other than you just need an "else" part.

    =IF(A1:A25>2, COUNTA(B1:B25), 0)

    so if your condition is true, counta will count # of non-blank cells in B1:B25, otherwise it's just going to show 0.

    I'm just not clear on the A1:A25>2 condition....if that's part of your question, you'll need to clarify what you're trying to do

  3. =IF(SUM (A1:A25) >2, COUNTA (B1:B25),"")

    which if i understand your question, would count the number of occupied cells in b1 to b25 as soon as the value(s) of the cells in a1 to a25 total more than 2.

Question Stats

Latest activity: earlier.
This question has 3 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions