This Formula does not work....

G

Gunjani

I'm trying to Count the amount of 'R' appearing in column D. Tried this
formula below but no joy.

=SUM($D$1:$D$249="R")

Also tried =SUM($D$1:$D$49=J16) where J!^ contains letter R but still no
joy.
--
Many Thanks

Gunjani
Under the bed is not a good place to save snowballs for
summer.
 
G

Gunjani

=COUNTIF($D$1:$D$249="R")

=COUNTIF($D$1:$D$249=J16)
Thank you. Only worked when the = is replaced by a , sign. But why cant
the original SUM formula work?
--
Many Thanks

Gunjani
Your mind can only hold one thought at a time.
Make it a positive and constructive one.
-- H. Jackson Brown, Jr.
 
G

Gunjani

Try:
=COUNTIF(C3:C10,"R")
Thank You but why could'nt the original SUM formula work?
How can I apply this formula to Cells in the same column shaded in Blue
i.e Total no of Blue Cells?
--
Many Thanks

Gunjani
At least I have a positive attitude about my destructive
habits.
 
F

Frank Kabel

Hi
if you want to sum based on colors you need VBA (a user
defined function) Build functions don't check the format
of a cell
-----Original Message-----
 
T

Tushar Mehta

You have to know the subtleties in how SUM works. It ignores
everything that is non-numeric. Your formula generates an 249 element
boolean array. SUM ignores booleans! Also, since the formula
generates an array, you would have to use an array formula to get SUM
to work with that array. So, array enter =SUM(N($D$1:$D$249="R")) and
it will work.

To array enter a formula use CTRL+SHIFT+ENTER to complete formula entry
rather than the usual ENTER.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 
Top