amartino44
Board Regular
- Joined
- Dec 12, 2012
- Messages
- 56
Hello. I created the if statement below. How can I add something that--if the range does NOT have a top border that in H"i", it divides G"i" by the next (looking down) cell in column G that has a cell with a top border?
Code:
Sub mal()
For i = 2 To 27
If Range("G" & i).Borders(xlEdgeTop).LineStyle = xlLineStyleNone Then
Else
Range("H" & i) = Range("G" & i)
End If
Next
End Sub