Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Loop for VBA code? paulinoluciano Excel Worksheet Functions 5 December 28th 05 01:30 PM
Loop Code sheeba Excel Programming 0 December 4th 05 06:12 AM
How to Loop some code Phil Osman Excel Discussion (Misc queries) 2 August 19th 05 11:14 AM
Help with loop code... gaba Excel Programming 1 October 20th 04 01:37 PM
VBE code in a loop loloflores Excel Programming 0 April 30th 04 12:28 PM


All times are GMT +1. The time now is 03:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"