Julmust Jaeger
New Member
- Joined
- Jul 20, 2022
- Messages
- 20
- Office Version
- 2016
- Platform
- Windows
Hello,
I am trying to make a pretty simple CONCAT macro to combine cells from each row (A & B) into a new column (D). A is composed of numbers and B is composed of dates (dd/mm/yy).
I have ended up with the following code which works very well posted in an earlier thread.
I am looking to make too small changes, though, I would like to not have the column have to be filled for it to run (I think this is the IF({1}," portion) and I would like the column B to remain in Date format.
Other VBA solutions/approaches are also obviously welcome!
TYA!
I am trying to make a pretty simple CONCAT macro to combine cells from each row (A & B) into a new column (D). A is composed of numbers and B is composed of dates (dd/mm/yy).
I have ended up with the following code which works very well posted in an earlier thread.
I am looking to make too small changes, though, I would like to not have the column have to be filled for it to run (I think this is the IF({1}," portion) and I would like the column B to remain in Date format.
VBA Code:
Sub mayoung()
With Range("D2", Range("D" & Rows.Count).End(xlUp))
.Value = Evaluate("If({1}," & .Offset(, -3).Address & "&""_""&" & .Offset(, -2).Address & ")")
End With
End Sub
Other VBA solutions/approaches are also obviously welcome!
TYA!