convert text to number with macro
Useful Excel macros
Convert a text to number with excel macro.
If you have
tasks in Microsoft Excel that you do repeatedly, you can record a macro to automate
those tasks. A macro is an action or a set of actions that you can run As many
times as you want. When you create a macro, you are recording your mouse Clicks
and keystrokes. After you create a macro, you can edit it to make minor Changes
to the way it works.
Suppose that you always receive
files with Numbers as a text. You want to format those text as numbers. You can
find a suitable macro in google search a i have given example in bottom and
then run a macro that quickly applies These formatting changes to the
cells you select.
Create
a macro.
1. In View Tab. See macros
written in the end
2. Select the circled option and click "View Macros".
5. Enter a name for the macro
in the "Macro name" field:
6. Then click Create to
start writing.
7. Replace below given text with…
8. With this code.
Sub Convert_Text_to_Numbers()
With Selection
.NumberFormat = "General"
.Value = .Value
End With
End Sub
9. Run the macro