This should be an easy one for someone...
I've managed to cobble together some code that does nearly everything I need, except for one lousy thing...
I need to add a new field in (S1) lets say FileNm and I need to populate that field from the first record to the last in my file.
I have looked at something like this...
Selection.AutoFill Destination:=Range("S2:S" & LastRow), Type:=xlFillDefault
or this
Range("S2").AutoFill Destination:=Range("S2:S" & LastRow, "File01")
Where LastRow is a variable I have defined earlier in the code as
LastRow = Range("J2").End(xlDown).Row
The problem is that instead of using a Type I'd really just like to call the value of another String variable I have defined earlier in my script, called File01 as I tried in the second example above.
This seems like something that should be pretty easy to do, I just cannot figure it out!
Thanks in advance.
I've managed to cobble together some code that does nearly everything I need, except for one lousy thing...
I need to add a new field in (S1) lets say FileNm and I need to populate that field from the first record to the last in my file.
I have looked at something like this...
Selection.AutoFill Destination:=Range("S2:S" & LastRow), Type:=xlFillDefault
or this
Range("S2").AutoFill Destination:=Range("S2:S" & LastRow, "File01")
Where LastRow is a variable I have defined earlier in the code as
LastRow = Range("J2").End(xlDown).Row
The problem is that instead of using a Type I'd really just like to call the value of another String variable I have defined earlier in my script, called File01 as I tried in the second example above.
This seems like something that should be pretty easy to do, I just cannot figure it out!
Thanks in advance.