# To insert the given row number for the corresponding row

I have set of numbers that indicate row numbers.
How do i set a indicator in excel to identify the row numbers?

Set of row numbers:

Points outside
6
18
60
71
201
266

2 ------
3........
4........
5........
6........
7......                                                                1

NOTE: observe that 6 is at the 7th row as header is = row 1.
Same concept apply to the rest of the numbers.

Thus to do a macro base to indicate the row number given whatever number stated in the file.

See attached.
Row-Indicator.xlsx
###### Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Older than dirtCommented:
Can you attach a workbook that shows at least some of the data and what you would like to see after the macro runs?
0
Author Commented:
Hi please see my edited question where i have uploaded the file. Thks !
0
Excel & VBA ExpertCommented:
``````Sub RowIndicator()
Dim lr As Long, i As Long
Dim x, y()
lr = Cells(Rows.Count, 1).End(xlUp).Row
x = Range("A2:C" & lr).Value
ReDim y(1 To lr, 1 To 1)
For i = 1 To UBound(x, 1)
If x(i, 3) <> "" And x(i, 1) <> "" Then
y(x(i, 3), 1) = 1
End If
Next i
Range("D2").Resize(lr - 1).Value = y
End Sub
``````
In the attached, click the button called "Row Indicator" to run the code and see if this is what you are trying to achieve.
Row-Indicator.xlsm
0

Experts Exchange Solution brought to you by