Need to Change the format of a column in Excel Sheet (german format)

Hi everybody,

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:

Sub macro()
Range("K:AC").Select 'specify the range which suits your purpose 
With Selection
Selection.NumberFormat = "#.##0,00"
.Value = .Value
End With
End Sub

Many thanks in adavance for any assitance and help. :+1:


we can use following activity:

Thanks for the advice @ppr , but with this activity I have the same problem. :frowning:

I already mentioned it in this post here to BalaReva. :wink:

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. :wink:

Sorry @ppr , but even in the debugging mode of the studio you cannot see any irregularities.

Es gibt immer einen Grund :slight_smile:

Hi everybody,

I finally made it with this short macro, which I recorded in Excel and that it worked.

Sub Makro()
 Selection.NumberFormat = "#,##0.00"
End Sub

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. :wink:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.