Hi,
I have an Excel 2003 spreadsheet which has been created by exporting data from a Delphi application.
I have written a macro to format the output (change column widths, add colours etc) and this is working fine.
However, I need to format a range of cells containing numbers such that if the value in the cell is > 0, the format will be "#,###.00". Otherwise, I need to display the value as 0 ie with no decimal places.
Is it possibe to use code similar to Selection.FormatConditions.Add....(something) in order to correctly format the cells?
Many thanks,
Merceng
I have an Excel 2003 spreadsheet which has been created by exporting data from a Delphi application.
I have written a macro to format the output (change column widths, add colours etc) and this is working fine.
However, I need to format a range of cells containing numbers such that if the value in the cell is > 0, the format will be "#,###.00". Otherwise, I need to display the value as 0 ie with no decimal places.
Is it possibe to use code similar to Selection.FormatConditions.Add....(something) in order to correctly format the cells?
Many thanks,
Merceng