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

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
The message means that there is data in cells to the right of column F that will be overwritten when the data is parsed.
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,586
Messages
6,120,402
Members
448,958
Latest member
Hat4Life

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