Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default For next loop

Hi all

Using Office Excel 2003 Sp1

When using the For i = 1 to 10
€˜Your code
Next i

Can the number 10 be obtained from a cells value on the same sheet or a
second sheet?
(a formula would produce the cells value of 10, 14, 25 etc..)

The value in the cell will not change while code is running.


--
Thank you

Regards

Bob C
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default For next loop


Code
-------------------

x = Worksheets("Sheet1").Range("A1").Value
For n = 1 To x
'- etc

-------------------

--
Brian

-----------------------------------------------------------------------
BrianB's Profile: http://www.excelforum.com/member.php...tinfo&userid=5
View this thread: http://www.excelforum.com/showthread.php?threadid=27074

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default For next loop

Hi Brian

Only 1 line, I was expecting 3 or 4 lines <g

Thank You

Regards Bob C

"BrianB" wrote:


Code:
--------------------

x = Worksheets("Sheet1").Range("A1").Value
For n = 1 To x
'- etc

--------------------


--
BrianB


------------------------------------------------------------------------
BrianB's Profile: http://www.excelforum.com/member.php...info&userid=55
View this thread: http://www.excelforum.com/showthread...hreadid=270747


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default For next loop

even less vbg

For n = 1 To Worksheets("Sheet1").Range("A1").Value
'- etc



--

HTH

RP

"Robert Christie" wrote in message
...
Hi Brian

Only 1 line, I was expecting 3 or 4 lines <g

Thank You

Regards Bob C

"BrianB" wrote:


Code:
--------------------

x = Worksheets("Sheet1").Range("A1").Value
For n = 1 To x
'- etc

--------------------


--
BrianB


------------------------------------------------------------------------
BrianB's Profile:

http://www.excelforum.com/member.php...info&userid=55
View this thread:

http://www.excelforum.com/showthread...hreadid=270747




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default For next loop

Hi Bob

I'm trying to get the hang of this excel and you and Tom Ogilvy keep moving
the goal posts <vbg

neat very neat
Thanks
regards Bob C


"Bob Phillips" wrote:

even less vbg

For n = 1 To Worksheets("Sheet1").Range("A1").Value
'- etc



--

HTH

RP

"Robert Christie" wrote in message
...
Hi Brian

Only 1 line, I was expecting 3 or 4 lines <g

Thank You

Regards Bob C

"BrianB" wrote:


Code:
--------------------

x = Worksheets("Sheet1").Range("A1").Value
For n = 1 To x
'- etc

--------------------


--
BrianB


------------------------------------------------------------------------
BrianB's Profile:

http://www.excelforum.com/member.php...info&userid=55
View this thread:

http://www.excelforum.com/showthread...hreadid=270747







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default For next loop

Hi Bob C,

You know what they say, stand still and you stagnate<vbg. On your toes!

Bob

"Robert Christie" wrote in message
...
Hi Bob

I'm trying to get the hang of this excel and you and Tom Ogilvy keep

moving
the goal posts <vbg

neat very neat
Thanks
regards Bob C


"Bob Phillips" wrote:

even less vbg

For n = 1 To Worksheets("Sheet1").Range("A1").Value
'- etc



--

HTH

RP

"Robert Christie" wrote in message
...
Hi Brian

Only 1 line, I was expecting 3 or 4 lines <g

Thank You

Regards Bob C

"BrianB" wrote:


Code:
--------------------

x = Worksheets("Sheet1").Range("A1").Value
For n = 1 To x
'- etc

--------------------


--
BrianB



------------------------------------------------------------------------
BrianB's Profile:

http://www.excelforum.com/member.php...info&userid=55
View this thread:

http://www.excelforum.com/showthread...hreadid=270747







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
Find loop doesn't loop JSnow Excel Discussion (Misc queries) 2 June 24th 09 08:28 PM
Using a for loop Jeff Excel Discussion (Misc queries) 1 November 8th 06 09:27 PM
Loop Heather O'Malley Excel Discussion (Misc queries) 1 November 6th 06 02:39 PM
Worksheet_Change - loop within a loop bgm Excel Programming 1 January 19th 04 01:27 PM
HELP!!!! Can't stop a loop (NOT an infinite loop) TBA[_2_] Excel Programming 3 December 14th 03 03:33 PM


All times are GMT +1. The time now is 08:18 PM.

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

About Us

"It's about Microsoft Excel"