![]() |
SUMIF in VBA
:rolleyes: I see what I missed Thanks for the help. Next question. I there a way to use range names? Sub summer() Dim EnderA As Range Dim EnderC As Range Dim EnderD As Range Dim Acta As String Range("A7").Select Set EnderA = Range(Selection, Selection.End(xlDown)) Set EnderC = Range(Selection, Selection.End(xlDown)) Set EnderD = Range(Selection, Selection.End(xlDown)) Range("E7:E1422").Formula = _ "=IF(A7=A6,"""",SUMIF(EnderA,A7,EnderC)" "-SUMIF(EnderA,A7,EnderD)) -- LeeBoWad ----------------------------------------------------------------------- LeeBoWadd's Profile: http://www.excelforum.com/member.php...fo&userid=1655 View this thread: http://www.excelforum.com/showthread.php?threadid=31409 |
All times are GMT +1. The time now is 09:01 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com