![]() |
Formula to count cells that contain a number & are not shaded
Hello,
I am trying to get Excel to count up blank (or non-shaded) cells, as well as cells that contain a "1" in it. Can someone please suggest a formula to do that? I really need it & an excel "guru" told me it could be done, but he didn't remember how. Any help would be greatly appreciated. Thank you! |
Formula to count cells that contain a number & are not shaded
If by "blank" you mean truly *empty* cells, *not* cells that equate to zero
length strings (""), and the "1" is a numerical 1, *not* a text "1", you can try this *array* formula: =SUM(--ISBLANK(A1:A10),COUNTIF(A1:A10,1)) -- Array formulas must be entered with CSE, <Ctrl <Shift <Enter, instead of the regular <Enter, which will *automatically* enclose the formula in curly brackets, which *cannot* be done manually. Also, you must use CSE when revising the formula. -- HTH, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "Thrlckr" wrote in message ... Hello, I am trying to get Excel to count up blank (or non-shaded) cells, as well as cells that contain a "1" in it. Can someone please suggest a formula to do that? I really need it & an excel "guru" told me it could be done, but he didn't remember how. Any help would be greatly appreciated. Thank you! |
Formula to count cells that contain a number & are not shaded
If you want to count zero length strings ("") *and* truly blank cells and
the numerical 1, you could try this: =SUM(COUNTIF(A1:A10,{"",1})) -- HTH, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "RagDyer" wrote in message ... If by "blank" you mean truly *empty* cells, *not* cells that equate to zero length strings (""), and the "1" is a numerical 1, *not* a text "1", you can try this *array* formula: =SUM(--ISBLANK(A1:A10),COUNTIF(A1:A10,1)) -- Array formulas must be entered with CSE, <Ctrl <Shift <Enter, instead of the regular <Enter, which will *automatically* enclose the formula in curly brackets, which *cannot* be done manually. Also, you must use CSE when revising the formula. -- HTH, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "Thrlckr" wrote in message ... Hello, I am trying to get Excel to count up blank (or non-shaded) cells, as well as cells that contain a "1" in it. Can someone please suggest a formula to do that? I really need it & an excel "guru" told me it could be done, but he didn't remember how. Any help would be greatly appreciated. Thank you! |
All times are GMT +1. The time now is 10:15 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com