Hi
I have created a macro for use in financial spreadsheets. The macro takes the formulae for each cell in a range and converts it to one rounded to 2dp
e.g. Original Formula "=A6/3" , New formula "=Round(A6/3,2)"
I've used an IF with .HasFormula to make sure it doesn't muck up any text, or already include "Round" in the formula, and all works well.
BUT I'd like to be able to get it to round any numerical values too, without messing up dates or text. (This would be particularly useful if Paste Special...Values is used)
Is their a way of identify the cells correctly in vba?
Thx in Advance
Jonathan
I have created a macro for use in financial spreadsheets. The macro takes the formulae for each cell in a range and converts it to one rounded to 2dp
e.g. Original Formula "=A6/3" , New formula "=Round(A6/3,2)"
I've used an IF with .HasFormula to make sure it doesn't muck up any text, or already include "Round" in the formula, and all works well.
BUT I'd like to be able to get it to round any numerical values too, without messing up dates or text. (This would be particularly useful if Paste Special...Values is used)
Is their a way of identify the cells correctly in vba?
Thx in Advance
Jonathan