wakwak1
01-22-2008, 11:58 PM
Dim x As Integer
Sheets("Sheet2").Select
Range("K3").Select
Do While IsEmpty(ActiveCell.Offset(0, 0)) = False
x = ActiveCell.FormulaR1C1
x = x / 100
ActiveCell.FormulaR1C1 = x
ActiveCell.Offset(1, 0).Select
However, when the active cell has like a few decimal places, then when I divide by 100 it ends up giving me an integer (i still want decimal places!).
I tried declaring x as long etc but that did not help.
2. I have certain rows of data (J3:M3) and the rows go from 3,4,5... etc and it is not known at what row they stop. If I have blank rows...how can i get vba to move the next available row of data up...so that there are no blank rows?
Sheets("Sheet2").Select
Range("K3").Select
Do While IsEmpty(ActiveCell.Offset(0, 0)) = False
x = ActiveCell.FormulaR1C1
x = x / 100
ActiveCell.FormulaR1C1 = x
ActiveCell.Offset(1, 0).Select
However, when the active cell has like a few decimal places, then when I divide by 100 it ends up giving me an integer (i still want decimal places!).
I tried declaring x as long etc but that did not help.
2. I have certain rows of data (J3:M3) and the rows go from 3,4,5... etc and it is not known at what row they stop. If I have blank rows...how can i get vba to move the next available row of data up...so that there are no blank rows?