I already studied this thread
and the solution from @prasath17 is working as long as you use the ‘english’ format of numbers, where the dot is the separator for the decimals and the comma for the thousands.
But when you use this macro for the ‘german’ format, where it is just the other way round you get a faulted format.
In the macro I used the follwing format:
As you can see here:
Range("K:AC").Select 'specify the range which suits your purpose
Selection.NumberFormat = "#.##0,00"
.Value = .Value
Many thanks in adavance for any assitance and help.
we can use following activity:
Thanks for the advice @ppr , but with this activity I have the same problem.
I already mentioned it in this post here to BalaReva.
in that case a debug on the datatable content / Excel cell content can help to find out the root cause
@mbe - Could you please let us know the desired output format?
The correct format would be
And this is the setting in Excel
as I already used in the macro.
Sorry @ppr , but even in the debugging mode of the studio you cannot see any irregularities.
Es gibt immer einen Grund
I finally made it with this short macro, which I recorded in Excel and that it worked.
Selection.NumberFormat = "#,##0.00"
It is interessting and I don´t have any explanation for this, but with this format in the macro the number format in Excel is correct, even it is the otherway round.
So, maybe this could help others.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.