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
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
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 <[email protected]>,
Gunter Schelfhout <[email protected]> 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
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks