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.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Private Sub CommandButton1_Click()
For Each C In Sheets("Order").Range("C68:C77")


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

Why are you looping?

What value do you actually want to copy and to where?
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,213,560
Messages
6,114,309
Members
448,564
Latest member
ED38

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top