jessemac_7
New Member
- Joined
- Feb 17, 2017
- Messages
- 3
Hello everyone 
I'm quite new to Excel macros but I've been introduced to a piece of work and I must say I'm completely stumped.
A bit of background first, not quite relevant to the problem but let's you know where I stand.
I've re-written an application that generates excel reports from a website and provides them to users. Some of these users have a special .xlsm that they use where they copy the contents of my reports into it, and it does some validation with other data.
After my re-write, the .xlsm files had to be updated with macros that could accept the new values and locations, everything works great except a single French report.
The values on this report are failing to validate unless if you highlight the column and run Data > Text to Columns > Fixed Width > General. The weird thing is, I can see no changes in the excel spreadsheet at all after doing this. However, I know changes have been made because Excel will ask me if I want to save before quitting, and the file size changes. Whatever this is doing, though not visible, allows the macros to run fine on it.
So I thought "simple enough" I'll record a macro of me doing it and have it inserted at the top of the macro that isn't working anymore. The macro showed up like this:
However! If you run the above macro, it does not do the same thing as running Text to Columns in Excel. The macro changes the way some of these numbers are displayed and just creates a weird mismatching of formatting
Ex:
236 490,59 becomes 236490.59
but
1 465 845,00 stays the same as 1 465 845,00
Because of this, adding that macro snippet to the top of the macro does not work and still fails validation.
I'm wondering if any can either
a) tell me what is happening when I'm pressing the "Text to Columns" button and nothing appears to change visually
but allows me to run my macro
b) suggest a way to update the macro snippet above so that it behaves in the same manor as the "Text to Columns" button
I have tried this in both Excel 2007 and Excel 2016, same results.
Sorry for the lengthy explanation, any assistance would be greatly appreciated!
Please let me know if you need any further details.
Thanks in advance!

I'm quite new to Excel macros but I've been introduced to a piece of work and I must say I'm completely stumped.
A bit of background first, not quite relevant to the problem but let's you know where I stand.
I've re-written an application that generates excel reports from a website and provides them to users. Some of these users have a special .xlsm that they use where they copy the contents of my reports into it, and it does some validation with other data.
After my re-write, the .xlsm files had to be updated with macros that could accept the new values and locations, everything works great except a single French report.
The values on this report are failing to validate unless if you highlight the column and run Data > Text to Columns > Fixed Width > General. The weird thing is, I can see no changes in the excel spreadsheet at all after doing this. However, I know changes have been made because Excel will ask me if I want to save before quitting, and the file size changes. Whatever this is doing, though not visible, allows the macros to run fine on it.
So I thought "simple enough" I'll record a macro of me doing it and have it inserted at the top of the macro that isn't working anymore. The macro showed up like this:
Code:
Columns("C:C").Select
Selection.TextToColumns Destination:=Range("C1"), DataType:=xlFixedWidth, _
FieldInfo:=Array(0, 1), TrailingMinusNumbers:=True
However! If you run the above macro, it does not do the same thing as running Text to Columns in Excel. The macro changes the way some of these numbers are displayed and just creates a weird mismatching of formatting
Ex:
236 490,59 becomes 236490.59
but
1 465 845,00 stays the same as 1 465 845,00
Because of this, adding that macro snippet to the top of the macro does not work and still fails validation.
I'm wondering if any can either
a) tell me what is happening when I'm pressing the "Text to Columns" button and nothing appears to change visually
but allows me to run my macro
b) suggest a way to update the macro snippet above so that it behaves in the same manor as the "Text to Columns" button
I have tried this in both Excel 2007 and Excel 2016, same results.
Sorry for the lengthy explanation, any assistance would be greatly appreciated!
Please let me know if you need any further details.
Thanks in advance!