How can I select the 101 cell from my excel sheet

How can I select the 101 cell from my excel sheet and repeat the same thing for the next 100 cell. My cells are selected within the colored area in the attached file.

Regards,

Dallag
File1.xlsx
Mohammed DallagPetroleum ConsultantAsked:
Who is Participating?
 
Subodh Tiwari (Neeraj)Connect With a Mentor Excel & VBA ExpertCommented:
Okay please refer to the attached and click the button to run the code.
File2.xlsm
0
 
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Please try this....
In the attached, click the button "Click To Select" to run the code. The code will prompt you to input the occurrence of 101th cell you want to select. So if you want to select the first occurrence, input 1 in the inputbox and click OK. So you can keep on selecting the 101th cell by inputting it's occurrence.

If you have any issue with downloading and opening the file, first download ans save the file on your system and then open it.

Sub Select101thCell()
Dim rng As Range
Dim n As Integer
n = Application.InputBox("Which occurrence of 101th cell you want to select? (e.g. 1,2,3...)", Type:=1)
Set rng = Range("A:F")
If n <> 0 Then rng.Cells(101 * n).Select
End Sub

Open in new window

File1.xlsm
0
 
Mohammed DallagPetroleum ConsultantAuthor Commented:
Dear Subodh Tiwari,

I need to save that number of cells in another column. Could you help in this?

Regards,

Dallag
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Hi Dallag,

Not sure about your requirement. Would you please elaborate each step you would like to automate?
And if possible, please upload another sample workbook with the desired output mocked up manually.
0
 
Mohammed DallagPetroleum ConsultantAuthor Commented:
Dear Subodh Tiwari,

I want just to save the numbers in a list after I select them. I created sheet2 and I put the cells selected in the attached file. I number of cells depend on the range of the data.

Regards,

Dallag
File2.xlsm
0
 
Mohammed DallagPetroleum ConsultantAuthor Commented:
Thank you
0
 
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
You're welcome Dallag! Glad to help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.