for each c

Keith.Jackson

Board Regular
Joined
Mar 31, 2005
Messages
115
I would like to have a seriers of numbers in a range. Each time I push a button , the next number is copied to a particular cell. When I try this , it always loops to the last number

Any help would be apreciated.
 

Some videos you may like

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Keith.Jackson

Board Regular
Joined
Mar 31, 2005
Messages
115
Private Sub CommandButton1_Click()
For Each C In Sheets("Order").Range("C68:C77")


Sheets("Order").Range("C80").Value = C
Next C
End Sub
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,047
Office Version
  1. 365
Platform
  1. Windows
Keith

Why are you looping?

What value do you actually want to copy and to where?
 

Keith.Jackson

Board Regular
Joined
Mar 31, 2005
Messages
115
I have a series of data that goes from one to ten rows. Then I want the user to be able to begin a new segment by push a "next segment button".

That will be a range with numbers from 1 to 26. When the button is pushed the next number will be selected and placed in a designated cell.
 

Watch MrExcel Video

Forum statistics

Threads
1,118,068
Messages
5,570,002
Members
412,304
Latest member
citrus
Top