rookie needs a macro...

  • Thread starter Thread starter Denise
  • Start date Start date
D

Denise

Colum H - rows 5-42 contain various positive and negative
number

I need... sum of all negative numbers in the column to
appear in H44
I need ....sum of all positive numbers in the column to
appear in H45

How do I enter the macro in the worksheet?

Thanks very much!!
 
Hi Denise,

I think you meant you need a formula.

H44

=Sumif(H5:H42, "<0")

H45

=Sumif(H5:H42, ">=0")

Hope that helps.

Regards,
Kevin
 
You shouldn't need a macro. Take a look in HELP index for SUMIF worksheet
function.
 
Denise,

A worksheet function does it

H44: =SUMIF(H5:H42,"<"&0)

H45: =SUMIF(H5:H42,">"&0)

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Dunno about a macro, but this can be easily done with formulas........

in H44 put =SUMIF(H5:H42,"<0")
in H54 put =SUMIF(H5:H42,">0")

and if you want the total number of each, rather than the sums,

for the negative numbers, use =COUNTIF(H5:H42,"<0")
and the positive numbers, use =COUNTIF(H5:H42,">0")

hth
Vaya con Dios,
Chuck, CABGx3
 
You' re more than welcome Denise.........thanks for the thanks, and keep
coming back.....

Vaya con Dios,
Chuck, CABGx3
 
Back
Top