Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
or
'----------------------- Sub GoodLoop() Dim Cnt As Double Dim StartVal As Double Dim NumToFill As Double Dim dblIncrement As Double NumToFill = Sheets("Control").Range("E17") dblIncrement = 1 / NumToFill StartVal = dblIncrement For Cnt = 0 To NumToFill - 1 ActiveCell.Offset(Cnt, 0).Value = Format(StartVal, "0.00%") StartVal = StartVal + dblIncrement Next Cnt End Sub '--------------------------------- Jim Cone San Francisco, USA "MichaelC" wrote in message ... I have a macro that performs a looped calculation stepping up the input value by 1 for each count. I want to use the same macro to perform the same looped calculation starting at 1% and ending at 100%, but have been unsuccessful. My power Programming book is silent on this. I would much appreciate any help. Here is my macro: Sub GoodLoop() StartVal = 1 NumToFill = Sheets("Control").Range("E17") ActiveCell.Value = StartVal For Cnt = 0 To NumToFill - 1 ActiveCell.Offset(Cnt, 0).Value = StartVal + Cnt Next Cnt End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
count rownumbers in loop | Excel Discussion (Misc queries) | |||
loop count | Excel Discussion (Misc queries) | |||
Jump to the next count in a FOR Loop | Excel Programming | |||
Help with macro to make it loop through coloums | Excel Programming |