Solved

How can I select the 101 cell from my excel sheet

Posted on 2016-08-13
Medium Priority
44 Views
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
0
Question by:Mohammed Dallag
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 4
• 3

LVL 33

Expert Comment

ID: 41754947
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.

``````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
``````
File1.xlsm
0

Author Comment

ID: 41755193
Dear Subodh Tiwari,

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

Regards,

Dallag
0

LVL 33

Expert Comment

ID: 41755194
Hi Dallag,

And if possible, please upload another sample workbook with the desired output mocked up manually.
0

Author Comment

ID: 41755195
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

LVL 33

Accepted Solution

Subodh Tiwari (Neeraj) earned 2000 total points
ID: 41755198
Okay please refer to the attached and click the button to run the code.
File2.xlsm
0

Author Closing Comment

ID: 41755199
Thank you
0

LVL 33

Expert Comment

ID: 41755200
You're welcome Dallag! Glad to help.
0

Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Suggested Courses
Course of the Month12 days, 9 hours left to enroll