ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   For next loop (https://www.excelbanter.com/excel-programming/314108-next-loop.html)

Robert Christie[_3_]

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

BrianB

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


Robert Christie[_3_]

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



Bob Phillips[_6_]

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





Robert Christie[_3_]

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






Bob Phillips[_6_]

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









All times are GMT +1. The time now is 09:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com