Macro to change number formatting in imported data

gruittbm

New Member
Joined
Apr 4, 2012
Messages
6
Hey all,

I have number data that is sent to me every week that comes in the General Format which throws off some of my formulas. It's a pain to convert the rows into number format manually every week...is there a macro function that can simplify this task? I tried recording a macro to do it, but it doesn't seem to be able to pick up on my formatting change.

Thanks!
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
It's more likely that it's not the cell format that is the issue but the underlying format of the data itself. If the values are coming in as text strings rather than numeric values you will need to convert them. Changing the cell format won't achieve this. It can usually be done using text to columns, multiplying by 1 or adding 0 to them.

Dom
 
Upvote 0

Forum statistics

Threads
1,216,113
Messages
6,128,907
Members
449,478
Latest member
Davenil

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