Sum Question

S

Sandy

After your kind help yesterday I wondered if you might be as helpful again.

Here's what I want to do

In cell G9 I have the formula =COUNTIF(H:H, "care of the elderly"), In H19 I
enter data (ie. care of the elderly or respiratory or Medical Cardiology and
so on), in K19 I have =DATEDIF(A19, I19, "D") (cells A19 & I19 are dates of
admission & discharge). In cell G9 I would like excel to add up the combined
days in any given month based on speciality in cell H19 and length of stay
in cell K19. Currently I only get the number of times "care of the elderly"
occurs not the sum of all "care of the elderly" admissions.

I hope you don't mind answering my (what on the face of it) simple requests.
It is really appreciated

Thanks
 
F

Frank Kabel

Hi Sandy
not quite sure I got your requirements correctly but you may try
=SUMIF(H:H,""care of the elderly",K:K)
 
J

JulieD

Hi Sandy

use the SUMIF function
=SUMIF(H:H, "care of the elderly",K:K)

cheers
JulieD
 
P

Peo Sjoblom

First of all, if you indeed are counting days with the datedif formula it is
not necessary,

=I19-A19

formatted as general will do the job


=SUMPRODUCT(--(H2:H100="care etc"),K2:K100)

will sum the days in K2:K100 where H2:H100 equals your criteria
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top