Hello people,
I need help with a code does following:
loops through Column J and K
if the values(text) are equal on the same row
select the Value in Column B and (same row) divided by the value in Column AB (same row) and present the new value -1 in the Column T
and if there is no value in column B after you find same value in J and K skip. that and continue loop
Could someone help me?
I got this code so far but I get an error
Could someone help me to correct the code otherwise give me a new code?
Thank you in advance
I need help with a code does following:
loops through Column J and K
if the values(text) are equal on the same row
select the Value in Column B and (same row) divided by the value in Column AB (same row) and present the new value -1 in the Column T
and if there is no value in column B after you find same value in J and K skip. that and continue loop
Could someone help me?
I got this code so far but I get an error
Code:
Sub test()
Dim i&, j&
Application.ScreenUpdating = False
With WorksheetFunction
For i = 1 To .Max(Cells(Rows.Count, "J").End(xlUp).Row, Cells(Rows.Count, "K").End(xlUp).Row)
If Cells(i, "J") = Cells(i, "K") And Len(Cells(i, "B")) <> 0 Then
j = j + 1
Cells(j, "T") = Cells(i, "B") / Cells(i, "AB") - 1
End If
Next i
End With
End Sub
Could someone help me to correct the code otherwise give me a new code?
Thank you in advance