ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   countif text? (https://www.excelbanter.com/excel-discussion-misc-queries/145403-countif-text.html)

shakey1181

countif text?
 
Struggling with a formula to count cells if corresponding cells are
populated. I;ve got the below so far:

=IF(B5:B45="S",COUNTA(I5:I45))

so i want to count all the 'I' cells only when the corresponding 'B' cell
contains an S. Column I contains text. Once I have done this, I also need to
sum another column once these two criteria are met. so something like:

=if(b5:b45="S",counta(i5:i45)),sum(g5:b45)

obviously both are wrong, so any hot tips from you guys/girls would be
gratefully recieved.

David Biddulph[_2_]

countif text?
 
I'm not quite sure what criteria you are looking for in column I, but you
could try
=SUMPRODUCT(--(B5:B45="S"),--(I5:I45<""),G5:G45)
--
David Biddulph

"shakey1181" wrote in message
...
Struggling with a formula to count cells if corresponding cells are
populated. I;ve got the below so far:

=IF(B5:B45="S",COUNTA(I5:I45))

so i want to count all the 'I' cells only when the corresponding 'B' cell
contains an S. Column I contains text. Once I have done this, I also need
to
sum another column once these two criteria are met. so something like:

=if(b5:b45="S",counta(i5:i45)),sum(g5:b45)

obviously both are wrong, so any hot tips from you guys/girls would be
gratefully recieved.




David Biddulph[_2_]

countif text?
 
Another option, depending on the criteria you're looking for in column I,
would be =SUMPRODUCT(--(B5:B45="S"),--ISTEXT(I5:I45),G5:G45)
--
David Biddulph

"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
I'm not quite sure what criteria you are looking for in column I, but you
could try
=SUMPRODUCT(--(B5:B45="S"),--(I5:I45<""),G5:G45)


"shakey1181" wrote in message
...
Struggling with a formula to count cells if corresponding cells are
populated. I;ve got the below so far:

=IF(B5:B45="S",COUNTA(I5:I45))

so i want to count all the 'I' cells only when the corresponding 'B' cell
contains an S. Column I contains text. Once I have done this, I also need
to
sum another column once these two criteria are met. so something like:

=if(b5:b45="S",counta(i5:i45)),sum(g5:b45)

obviously both are wrong, so any hot tips from you guys/girls would be
gratefully recieved.







All times are GMT +1. The time now is 03:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com