How to Fix Excel VBA PasteSpecial Errors with Comma Decimal Separators
Question details
Users need a reliable way to import German or European CSV data containing comma decimal separators without encountering Excel VBA PasteSpecial formatting errors.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Importing CSV data that uses commas for decimals and semicolons for delimiters into Excel using VBA macros and the PasteSpecial method.
- Observed behavior
- Excel's session-level CSV parser incorrectly interprets the commas, leading to wrong data formatting that persists across all open workbooks in the same session.
Ensure your computer's regional settings are noted, and save your current workbook before testing new VBA macros or Power Query imports.
Use Power Query for Reliable CSV Imports
Power Query bypasses Excel's session-level CSV parser, making it the most robust method for handling regional number formats like comma decimals.
By utilizing Power Query instead of VBA PasteSpecial, you avoid clipboard memory quirks and session-level formatting inheritance. It allows you to explicitly define the locale and data types.
Navigate to the Data tab on the Excel ribbon and click on 'Get Data'.
Choose 'From File' and then 'From Text/CSV', and locate your target CSV file.
Click 'Transform Data' to open the Power Query Editor. Here, you can define the delimiter (e.g., semicolon) and set column data types using the correct locale (e.g., German) to accurately parse comma decimals.
Once the data is correctly formatted in the preview, click 'Close & Load' to import it safely into your workbook.

Parse Text Manually Using the VBA Split Function
Avoid PasteSpecial entirely by reading the text directly into VBA, splitting it by rows and delimiters, and writing it to the destination.
Use a Blank Workbook as an Intermediary
Isolate the session memory issue by pasting the CSV data into a new, blank workbook first before transferring it to your target destination.
Try WPS Office for Seamless Spreadsheet Management
If Excel's VBA and session-level parsing quirks are slowing down your workflow, WPS Office offers a lightweight, highly compatible, and free alternative. It seamlessly handles standard spreadsheet formats while providing a familiar and intuitive user interface.
- 1. Download and Install: Get the free WPS Office installer from the official website and run the setup.
- 2. Launch WPS Spreadsheets: Open the application and load your existing Excel workbooks or CSV files.
- 3. Import Data Seamlessly: Use WPS Spreadsheets' intuitive data import features to handle regional formats effortlessly.

Frequently Asked Questions
Why does Excel VBA PasteSpecial misinterpret comma decimals in CSVs?
Excel often defaults to US regional settings during VBA macro operations, which expect periods for decimals. When it encounters commas, it may treat them as thousands separators or text strings, ultimately corrupting the imported data.
Does the CSV parsing issue affect all open workbooks?
Yes, this specific parsing behavior affects the entire active Excel session. Once a workbook processes data with certain delimiter rules via VBA, other workbooks in the same session may inherit that behavior until the application is restarted.
How do I change the default decimal separator in Excel?
You can manually override system settings by going to File > Options > Advanced. Under 'Editing options', uncheck 'Use system separators' and manually define your preferred decimal and thousands separators.
Is Power Query better than VBA for CSV imports?
Generally, yes. Power Query isolates the data connection from Excel's session-level memory quirks. It allows you to explicitly define locales, delimiters, and data types without writing complex VBA parsing loops.




