Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Loop in Excell with VBA-code.
I need a loop in VBA-code which:
- inserts a value from 1 to 500 in cell N23979 - reads the value from cell Q23975 and inserts these solutions in cells B23980 to B24480 so I can compare the solutions. TIA |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Loop in Excell with VBA-code.
One way:
Dim i As Long Dim rArg As Range Dim rRes As Range Dim rDest As Range Set rArg = Range("N23979") Set rRes = Range("Q23975") Set rDest = Range("B23979") For i = 1 To 500 rArg.Value = i rDest.Offset(i, 0).Value = rRes.Value Next i Note that the 500 results will only extend to B24479. In article , Gunter Schelfhout wrote: I need a loop in VBA-code which: - inserts a value from 1 to 500 in cell N23979 - reads the value from cell Q23975 and inserts these solutions in cells B23980 to B24480 so I can compare the solutions. TIA |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Loop in Excell with VBA-code.
JE McGimpsey wrote:
[snip] I need a loop in VBA-code which: - inserts a value from 1 to 500 in cell N23979 - reads the value from cell Q23975 and inserts these solutions in cells B23980 to B24480 so I can compare the solutions. It works great, thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Loop for VBA code? | Excel Worksheet Functions | |||
Loop Code | Excel Programming | |||
How to Loop some code | Excel Discussion (Misc queries) | |||
Help with loop code... | Excel Programming | |||
VBE code in a loop | Excel Programming |