How to substract using sumif.

W

wendy

Ok, I have found out to sum the totals, however, I will
like for this formula to substract Lunch. I will real
real appreciate any help. This formula does not work.

c.Offset(6, 1).Formula = "=Sumif(" & rng1.Offset(0,
2).Address & _
",""LUNCH""," & rng1.Offset(0, 4).Address & ")"
 
W

wendy

Sorry this is the formula: the sum total should subtract
lunch

"=Sum(" & rng1.Offset(0, 4).Address & ")"-sumif((" &
rng1.Offset(0, 2).Address & _
",""LUNCH""," & rng1.Offset(0, 4).Address & ")"
 
B

Bob Phillips

Wendy,

This is what I think you want

"=SUM(" & rng1.Offset(0, 4).Address & _
")- SUMIF(" & rng1.Offset(0, 2).Address & _
",""LUNCH""," & rng1.Offset(0, 4).Address & ")"

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

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