VBA Row.Address syntax


Hoping someone can help with my reference/method/argument in VBA.  Had my first Workbook Event macros functioning until i wanted to improve it.  Goal is to have it update column E with a formula for ONLY newly entered rows of data in columns A-D.  Seems simple, however - first version used FILLDOWN, and as a result applied the formula (and formatting) in column E in a manner that freaked out the end users.   Update desire is to identify the first row of new data, last row of new data, and apply column e formula only to those rows.  I've used Rows.Address to some success in the past, but not sure how to tweak it to accomplish this task.  Any advice is greatly appreciated.  Also - tagging @Hans Vogelaar just in case you have a minute since you've been so kind to humor me in the past!




2 Replies


You don't need RowStart and RowEnd.

And you shouldn't enclose StartRange and RowRange in quotes.

    RowRange = Range("A" & Rows.Count).End(xlUp).Row
    StartRange = Range("E" & Rows.Count).End(xlUp).Row
    Range("E" & StartRange & ":E" & RowRange).FillDown


good lord... if there's one thing i've learned in attempting VBA, it's that things are usually simpler than I make it. I always have a hard time figuring out what is unnecessary.... Thank you!