Tamires Lustosa
New Member
- Joined
- Mar 16, 2020
- Messages
- 4
- Office Version
- 2016
- Platform
- Windows
Hi everyone
I have no clue about programming in VBA but I am trying to record a macro to delete the characters "*" and ">" from my table.
The table format is "mm:ss.0" and the value is for example 00:01:46 when I select the cell.
But when I run my macro, it changes to 12:01:46...
It changes completely the value of Collum A (that converts the time to the total amount of seconds), as shown in the picture.
This can sound stupid but why is this happening?
Remember that I didnt write the code, I pressed in "record macro"
Here is the code:
Sub Delete_Character()
'
' Delete_Character Macro
' Delete * < >
'
' Keyboard Shortcut: Ctrl+d
'
Columns("D:D").Select
Selection.Replace What:=" *", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.Replace What:=" >", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Range("D3").Select
End Sub
Thank you so much!
I have no clue about programming in VBA but I am trying to record a macro to delete the characters "*" and ">" from my table.
The table format is "mm:ss.0" and the value is for example 00:01:46 when I select the cell.
But when I run my macro, it changes to 12:01:46...
It changes completely the value of Collum A (that converts the time to the total amount of seconds), as shown in the picture.
This can sound stupid but why is this happening?
Remember that I didnt write the code, I pressed in "record macro"
Here is the code:
Sub Delete_Character()
'
' Delete_Character Macro
' Delete * < >
'
' Keyboard Shortcut: Ctrl+d
'
Columns("D:D").Select
Selection.Replace What:=" *", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.Replace What:=" >", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Range("D3").Select
End Sub
Thank you so much!