View Single Post
 
Old 03-04-2016, 06:18 AM
npalmer610 npalmer610 is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Feb 2016
Posts: 5
npalmer610 is on a distinguished road
Default Help With Copy Formula Down Macro

Hello. I was able to tweak a macro that was provided on another forum to copy a formula down to the last row (based on the adjacent column). I would like to instruct the code to run on all sheets in the workbook, so long as it's not a blank sheet, without having to click through each sheet then rerun the macro. Could someone please assist me with that? Thank you!

Code:
Sub CopytoLast()
Dim LastRow As Long
Columns("F").ClearContents
LastRow = Cells(Rows.Count, "E").End(xlUp).Row
Range("F2:F" & LastRow).Formula = "=CONCATENATE(A2,"" "", D2, "" "", E2)"
End Sub
Reply With Quote