Help with counting in Excel with a condition

Closed
Jilly - 7 May 2010 à 09:48
rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 - 7 May 2010 à 10:16
Hi,
I would like Excel to count a range of non-blank cells and enter the number but if all the cells in the range are blank, I'd like it to fill in with an "x". Is this possible?
Thanks
Jilly
Related:

1 response

rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 766
7 May 2010 à 10:16
Try this

=IF(SUMPRODUCT(1 * (A1:A50 =""))+ SUMPRODUCT(1 * (A1:A50<>""))=SUMPRODUCT(1 * (A1:A50 ="")), "X", COUNTA(A1:A50))