#1   Report Post  
grandfilth
 
Posts: n/a
Default Do loops


Hi,
Is it possible to call show the value of the first, second, third or
forth iteration of a do loop, and continue with the iterations to still
get an end value?This is to give me some idea of what the do loop is
doing...

Also, say my function is called jeff(....) can I change the value of it
according to what cell the function is showing in? For example,

if cell=A2 then
jeff = ....
end if
?

Any help would be great


--
grandfilth
------------------------------------------------------------------------
grandfilth's Profile: http://www.excelforum.com/member.php...o&userid=28240
View this thread: http://www.excelforum.com/showthread...hreadid=483704

  #2   Report Post  
Bryan Hessey
 
Posts: n/a
Default Do loops


It's pretty uncouth, but a variation of

Dim ctr, ctr1, ctr2, ctr3, ctr4 As Integer
ctr = 1
For ctr1 = 1 To 4
For ctr2 = 5 To 7
For ctr3 = 10 To 13
For ctr4 = 20 To 30
Range("AA" & ctr).Value = " 1 = " & ctr1 & " 2 = " & ctr2 & " 3 = "
& ctr3 & " 4 = " & ctr4
ctr = ctr + 1
Next
Next
Next
Next


should leave a trail in column AA for you, up to 65536 items before an
error


grandfilth Wrote:
Hi,
Is it possible to call show the value of the first, second, third or
forth iteration of a do loop, and continue with the iterations to still
get an end value?This is to give me some idea of what the do loop is
doing...

Also, say my function is called jeff(....) can I change the value of it
according to what cell the function is showing in? For example,

if cell=A2 then
jeff = ....
end if
?

Any help would be great



--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=483704

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
Max limit of 7 nested loops Subu Excel Worksheet Functions 2 May 28th 05 02:14 PM


All times are GMT +1. The time now is 05:30 PM.

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"