Hello guys I have made following function:
Loops through column J and column K, check on same row if the the text content in the cells are same and if column AB same row have content if empty goahead until found.
I want instead:
Loops through column J and column K, check on same row if the text content is ="IND" in the cells on same row then chekc if Column AB same row have content if empty goahead until found.
Could someone help me to modify it?
Thank you in advance
Loops through column J and column K, check on same row if the the text content in the cells are same and if column AB same row have content if empty goahead until found.
I want instead:
Loops through column J and column K, check on same row if the text content is ="IND" in the cells on same row then chekc if Column AB same row have content if empty goahead until found.

Code:
<code style="margin: 0px; padding: 0px; font-style: inherit; font-weight: inherit;">Sub CheckMatch()
For i = 2 To ActiveSheet.UsedRange.SpecialCells(xlCellTypeLastCell).Row
If Cells(i, "J") = Cells(i, "K") And Len(Cells(i, "B")) <> 0 And Cells(i, "AB") <> 0 Then ' modify here .
'Dim DivAB As String
'Rows(i).Select
'Cells(i, "B").Select
Cells(i, 1).EntireRow.Interior.ColorIndex = 6
myCell = Cells(i, "B").Text
mycellRes = myCell - 1
DivAB = Cells(i, "AB").Text
myTot = Round(DivAB / mycellRes)
'mycellSel = Cells(i, "T").Select
'ActiveCell.Value = myTot
Cells(i, 20) = myTot
'MsgBox myTot
End If
Next i
</code>[COLOR=#333333]End Sub
[/COLOR]
Could someone help me to modify it?
Thank you in advance