I have a macro for importing data from an XML file and converting it to CSV (after some manipulation, amputation etc.). One field represents the odds of something happening. This means the field contains mostly integers and some fractions. I want all fractions to display (and save in .csv) as decimals w/2 sig figs. In other words, if the field right now displays as 3/5 I want it to convert to 0.60.
I have indicated that the column should be Numeric. I thought this would make 3/5 turn into 0.60 but it does not, as nothing changes. I figured out that it only changes if I DOUBLE CLICK on the fractional value (??!?) after setting the column as a Number. Note that I change nothing in the cell, just double click and then move away.
How do I, within a macro, tell excel I want junk like 1/5 to render as 0.20?
I have indicated that the column should be Numeric. I thought this would make 3/5 turn into 0.60 but it does not, as nothing changes. I figured out that it only changes if I DOUBLE CLICK on the fractional value (??!?) after setting the column as a Number. Note that I change nothing in the cell, just double click and then move away.
How do I, within a macro, tell excel I want junk like 1/5 to render as 0.20?