brothertruffle880
asked on
excel 2013 substitute function
I would like to take all instances of the colon ":" in cell A1 and replace it with nothing. Not even a space.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I do not use VBA so I will have to let someone else take over, however it appears you need something after ';' in the line Selection.Formula.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Pleased to help, but I really cannot understand why you need to use a formula
ASKER
I meant to edit the question and EE blocked me.
Here's the rest of my request.
I want to get rid of the colon in my VBA code so that I can name my active sheet with the time of day.
Sub NameWorksheetByDated()
Range("A1").Select
Selection.Formula = "=text(now(),""mmmm dd, yyyy hh:mm:ss"")"
' the line below is not working!
Selection.Formula = "=substitute(A1,':')"
Selection.Copy
Paste
ActiveSheet.Name = Range("A1").Value
Range("A1").Value = ""
Application.CutCopyMode = False
End Sub