Hi all,
I need set the value of a cell based on the values of 2 other cells in the same row. Then I need to loop this to do it for all the rows with data. In my code I put ranges D2 and L2 but I need it to go down for each next cell in column A. I hope this makes sense. Any advice would be appreciated.
Regards,
Hash
I need set the value of a cell based on the values of 2 other cells in the same row. Then I need to loop this to do it for all the rows with data. In my code I put ranges D2 and L2 but I need it to go down for each next cell in column A. I hope this makes sense. Any advice would be appreciated.
Regards,
Hash
Code:
Sub MM_Conv()
Dim RowCount As String
Dim Cell As Range
RowCount = WorksheetFunction.CountA(Columns("A:A"))
For Each Cell In Range("A2:A" & RowCount)
If Range("D2").Value = "LONG" & Range("L2").Value = "C" Then
Cell.Value = "B"
End If
Next Cell
End Sub