VBABEGINER
Well-known Member
- Joined
- Jun 15, 2011
- Messages
- 1,284
- Office Version
- 365
- Platform
- Windows
Hi All,
I'm trying to write one logic (in loop). How can I write rk value. I want to read rk every cell value.
I'm trying to write one logic (in loop). How can I write rk value. I want to read rk every cell value.
VBA Code:
Sub code()
Sheets("Sheet1").Select
Dim cn As Integer
Dim i As Integer
i = 2
cn = Range("BN" & Rows.Count).End(xlUp).Row
Dim rk As Integer
rk = Range("BN2") 'comment - read every value..
For i = 2 To cn
If ActiveSheet.Range(Cells(i, "BN")) = rk Then
End If
Next i
End Sub