![]() |
#3
|
|||
|
|||
![]() Quote:
I agree that I don't need a macro to accomplish this. Seems to be really easy. My intention is to be able to do it with a macro. That way I would like to be able to automate what I'm trying to do. The main purpose is that I can combine it with other macros and run it automatically. I have tried the below code but does not work so I'm getting a Run-time error "1004". Application-define or object-defined error. If someone can help me with this, I will appreciate it. Will keep trying... Code:
Sub Main() Dim ws As Worksheet, c As Long, s$ For Each ws In Worksheets With ws c = .Cells(.Rows.Count, "B").End(xlUp).Row s = "=NF" & "-" & "A1" & Left(B10, 5) & "-" & Mid(B10, 7, 45) & "--Budget 2019" 'Debug.Print s .Range("A10").Formula = s .Range("A10").Copy .Range(.Range("A10"), .Cells(c, "A")) End With Next ws End Sub Thanks all. |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
rsrasc | Excel Programming | 4 | 08-22-2018 12:17 PM |
![]() |
b16 | Excel | 1 | 01-09-2017 04:51 PM |
![]() |
isasa74 | Excel Programming | 24 | 12-20-2015 06:01 AM |
![]() |
anickles | Excel | 2 | 02-06-2015 09:39 AM |
If, move and concatenate in VBA | devcon | Excel Programming | 0 | 07-04-2011 12:44 AM |