True Convert to Number-VBA

catalena2

New Member
Joined
Dec 29, 2016
Messages
1
I'm trying to convert a selected range to a number. The only way it works when doing it manually is when you click on the flag and select Convert to Number. Multiplying the values by 1, copy and pasting values, and changing the formatting (via right click, format cells, Number) all do not work and a green flag remains in the top left corner of the cells

How can I get do this via VBA?

Code:

Sub Format_Column()
Range("G2").Select​
Range(Selection, Selection.End(xlDown)).Select​
xxxxxx​
End Sub
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Hi

I believe you could use text to columns in the data TAB?
I think you can use the macro recorder to get what you require.

Dave
 
Upvote 0
Show an example of what in in the range you want to convert. Also clarify if you want to format the range as Integer, or if you have text value that you want to convert to numeric value.
 
Upvote 0
or

what happens when you use copy and paste back as values

dave
 
Upvote 0

Forum statistics

Threads
1,214,650
Messages
6,120,736
Members
448,988
Latest member
BB_Unlv

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