Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default SUMIF in VBA


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

--
LeeBoWad
-----------------------------------------------------------------------
LeeBoWadd's Profile: http://www.excelforum.com/member.php...fo&userid=1655
View this thread: http://www.excelforum.com/showthread.php?threadid=31409

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default SUMIF in VBA

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))"

--
Regards,
Tom Ogilvy

"LeeBoWadd" wrote in message
...

Hello all Im new to the forum. Working for a Fortune 500 Co as an
Accountans Assist. I basicaly write macros/VBAs' to streamline
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 to
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 help


--
LeeBoWadd
------------------------------------------------------------------------
LeeBoWadd's Profile:

http://www.excelforum.com/member.php...o&userid=16552
View this thread: http://www.excelforum.com/showthread...hreadid=314096



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sumif VielExcel Excel Worksheet Functions 2 November 25th 08 02:14 PM
sumif for multi conditions. i.e sumif(A1:A10,"Jon" and B1:B10,"A" Harry Seymour Excel Worksheet Functions 9 June 12th 07 10:47 PM
Embedding a Sumif in a sumif C.Pflugrath Excel Worksheet Functions 5 August 31st 05 07:31 PM
nested sumif or sumif with two criteria dshigley Excel Worksheet Functions 5 April 5th 05 03:34 AM
SUMIF - Range name to used for the "sum_range" portion of a SUMIF function Oscar Excel Worksheet Functions 2 January 11th 05 11:01 PM


All times are GMT +1. The time now is 05:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"