Numbers To Text - Easier Way ?

CONFUSED_AS_USUAL

Board Regular
Joined
Jul 6, 2017
Messages
59
Hi,

Probably an embarrassing question. But, how can I change a range of numbers in numbers format to text format with 1 button or a macro ? It does not work by just changing the format. The only cumbersome way that I have found is to insert another adjacent column and use the "text" function. Then format it to values and delete a row.

Too cumbersome & I do this too often. Must be an easier way.

Thks.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Might I ask why you want to convert numbers to text (string)? Generally I see requests about going the other way.

To directly address your question though, is it a specific column that you do this to each time? It wouldn't be too difficult to build some code to accomplish this.
 
Upvote 0
How about text to columns.
On Data tab select text to columns, Next,Next, then select Text & finish
 
Upvote 0
But, how can I change a range of numbers in numbers format to text format with 1 button or a macro ? It does not work by just changing the format.
:confused: Why doesn't it work by just changing the format? If you do the Text To Columns method, which you seem to indicate works for you, it does the same thing as formatting the cells would do (as far as I can see). What is it about changing the format that you think does not work for you?
 
Upvote 0
Changing the format doesn't change an already-entered number to text, Rick.

[Table="width:, class:grid"][tr][td="bgcolor:#C0C0C0"][/td][td="bgcolor:#C0C0C0"]
A​
[/td][td="bgcolor:#C0C0C0"]
B​
[/td][td="bgcolor:#C0C0C0"]
C​
[/td][td="bgcolor:#C0C0C0"]
D​
[/td][/tr][tr][td="bgcolor:#C0C0C0"]
1​
[/td][td]
123​
[/td][td="bgcolor:#E5E5E5"]
TRUE​
[/td][td]B1: =ISNUMBER(A1)[/td][td]Format of A1: General[/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
2​
[/td][td]
123​
[/td][td="bgcolor:#E5E5E5"]
TRUE​
[/td][td]B2: =ISNUMBER(A2)[/td][td]Format of A2: @[/td][/tr]
[/table]
 
Upvote 0
Changing the format doesn't change an already-entered number to text, Rick.

[Table="width:, class:grid"][tr][td="bgcolor:#C0C0C0"][/td][td="bgcolor:#C0C0C0"]
A​
[/td][td="bgcolor:#C0C0C0"]
B​
[/td][td="bgcolor:#C0C0C0"]
C​
[/td][td="bgcolor:#C0C0C0"]
D​
[/td][/tr][tr][td="bgcolor:#C0C0C0"]
1​
[/td][td]
123​
[/td][td="bgcolor:#E5E5E5"]
TRUE​
[/td][td]B1: =ISNUMBER(A1)[/td][td]Format of A1: General[/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
2​
[/td][td]
123​
[/td][td="bgcolor:#E5E5E5"]
TRUE​
[/td][td]B2: =ISNUMBER(A2)[/td][td]Format of A2: @[/td][/tr]
[/table]

Yes, of course (I was thinking the OP wanted something else when I posted that).
 
Upvote 0
Might I ask why you want to convert numbers to text (string)? Generally I see requests about going the other way.

To directly address your question though, is it a specific column that you do this to each time? It wouldn't be too difficult to build some code to accomplish this.

Hi Mr.Kowz,

Yes, I must admit that it is unusual. However, this is how are system is set up.

To answer your question - no, the column will not always be the same. Maybe code that would only be affected only if it recognizes it as being that is highlighted - meaning chosen as if ready to be copied ?
 
Upvote 0
Hi Mr.Kowz,

Yes, I must admit that it is unusual. However, this is how are system is set up.

To answer your question - no, the column will not always be the same. Maybe code that would only be affected only if it recognizes it as being that is highlighted - meaning chosen as if ready to be copied ?

Understandable. The other people who have posted here have pretty well the best solution (text-to-columns). You should be able to utilize the macro recorder to get the general code for what you're trying to accomplish. If you need any assistance amending the code to fit your scenario, let us know!
 
Upvote 0

Forum statistics

Threads
1,223,578
Messages
6,173,165
Members
452,504
Latest member
frankkeith2233

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top