SUMIF in VBA

  • Thread starter Thread starter LeeBoWadd
  • Start date Start date
L

LeeBoWadd

Hello all Im new to the forum. Working for a Fortune 500 Co as a
Accountans Assist. I basicaly write macros/VBAs' to streamlin
processes.

Q. Is there a way to right this
"=IF(A7=A6,
",SUMIF(A$7:A$1422,A7,C$7:C$1422)-SUMIF(A$7:A$1422,A7,D$7:D$1422))"

in a VBA script. I want to paste this in ("E7") then copy down
After copy and paste back values so that slow cpu's won't have t
recalc every time any small changes are made.

(A) (B) (C) (D)
(E)
(6) REF# BR DEBIT CREDIT DIFF
(7) 4920 10 278.93 226.88
(8) 4920 10 278.93
(9) 4920 10 226.88
(10) 8123 10 64.84 64.84
(11) 8133 10 70.12 70.12
(12) 8134 10 43.83 43.83
(13) 8158 10 63.18 63.18
(14) 8217 10 36.60 36.60
(15) 8253 10 143.69 143.69
(16) 8303 10 158.81 158.81
(17) 8327 10 317.63 317.63
(18) 8359 10 80.33 80.33
(19) 8360 10 26.30 26.30


Thanks for the hel
 
Range("E7:E30").Formula = _
"=IF(A7=A6,"""",SUMIF(A$7:A$1422,A7,C$7:C$1422)" & _
"-SUMIF(A$7:A$1422,A7,D$7:D$1422))"
 

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

Back
Top