View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
jindon[_52_] jindon[_52_] is offline
external usenet poster
 
Posts: 1
Default Macro to add count forumla with dynamic range


Hi

try

"=sum(r5c:r[-1]c)"

or

"=sum(r" & fixedStartRow & "c:r" & dynamicRow & "c)"

Note: Not sure if the line "fixedStartRow = 5 - Row" is working...
If Row is a variable, change it to other name due to the vba reserve
word

--
jindo
-----------------------------------------------------------------------
jindon's Profile: http://www.excelforum.com/member.php...fo&userid=1313
View this thread: http://www.excelforum.com/showthread.php?threadid=55127