![]() |
|
#1
|
|||
|
|||
|
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
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| a macro that can copy data from copy.xls to our current excel macro.xls based on criteria: | udhaya | Excel Programming | 1 | 11-12-2015 10:12 AM |
Question about Index match formula to copy all of cells in row
|
dmcg9760 | Excel | 1 | 11-08-2015 01:41 AM |
| Macro to copy formula from one cell to another | anwar | Excel Programming | 1 | 04-25-2014 08:27 PM |
Use formula to copy cell formats also
|
mike_abc | Excel | 10 | 12-10-2011 01:55 AM |
| Excel copy formula | KMS | Excel | 1 | 08-16-2011 03:02 PM |