Need Help on "Do You want to replace the contents of the destination cells?"

wonderergirl

New Member
Joined
Aug 3, 2014
Messages
28
I have this code to fixed the width of "F" Column. However, there will be a message asking me "Do You want to replace the contents of the destination cells?". I do not want to replace the contents and therefore I click "Cancel" then it will stop my whole macro from working.

This problem does not occur to all kind of data just to certain but I have no idea why it will have this error in the first place. Can anyone please help me with this and explain the reason why it can't work fine on that certain data. Thanks

Code:
Columns("F:F").Select    Selection.TextToColumns Destination:=Range("F1"), DataType:=xlFixedWidth
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
The message means that there is data in cells to the right of column F that will be overwritten when the data is parsed.
 

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
Other than clicking Cancel or making sure that there are enough blank columns to parse the data before running your macro, I don't know, sorry.
 

Watch MrExcel Video

Forum statistics

Threads
1,129,810
Messages
5,638,484
Members
417,027
Latest member
wlknspc7

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
Top