Help With Excel Loop Macro

April 11, 2011 at 02:14:34
Specs: Windows 7
Hi I need the following formula to loop down the page and stop at every blank line then carry on , This is to be done using coloum G.
Below is the formula,

=SUMIF(G8:G15,"<="&DATE(2011,4,27),J8:J15)-SUMIF(G8:G15,"<="&DATE(2011,2,1),J8:J15)

im thinking this has to be done in a VB Macro but cannot figure out what the code should be..... Thank you


See More: Help With Excel Loop Macro

Report •


#1
April 11, 2011 at 12:14:20
Can't help you with a Macro, but why can't you just drag the formula down the sheet?

MIKE

http://www.skeptic.com/


Report •

#2
April 12, 2011 at 08:45:01
Sub FindBlankCell()
Dim iEndRow As Long, r As Long
iEndRow = Range("G65536").End(xlUp).Row

For r = 1 To iEndRow
If Range("G" & r).Value = "" Then
Range("G" & r).Value = "Blank Cell" 'here is the blank row so enter whatever value you want in place of "Blank Cell"
End If
Next
End Sub

Report •

Related Solutions


Ask Question