Marco error deletes raw data, but only on the first run

Orion19

Board Regular
Joined
Dec 18, 2017
Messages
56
Hi!


I have two files, one is a CSV raw data set and the other contains my macros. The macros modify the raw data set so that it is readable and adds some tools to the file that help analyze the data. The first time I run it chunks of data are deleted from the raw data set and outputs are truncated (e.g. "When Requested" comes out as "When"). However, every other time I run it after the first attempt works perfectly. I have no idea why the first run through produces a bug every single time. Here's a breakdown of the patterns I can find. I'm running Excel for Mac Version 16.11. Any thoughts on what's happening are greatly appreciated!



  • The bug only happens the first run after Excel starts up. I can run the macro a second time on the same data set (or a new data set) and everything works perfectly. If I close both files (but leave Excel running), open them again, then run the macro, everything works fine. The bug only happens on the first run after Excel is closed completely.
  • The bug produces a pattern that deletes the contents of a cell if the first group of characters are strictly numerical. For example, a cell that should contain "5 blocks" is deleted but a cell that contains "03b. Clean" is unaffected.

Thanks again!
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
This is going to be nearly impossible to try to see what the problem may be without seeing your VBA code (at the very least) and possibly your data file.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,171
Members
453,021
Latest member
Justyna P

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