Hi,
I have a spreadseet where in column A I have values I need to test.
It looks like this:
-- removed inline image ---
What I need is a test in column B - to identify sites - in this case: Paris, Dublin, Berlin. I'm trying to write a function to be called out in column B - to identify cells which has up/down borders - to find "site names".
What I have so far is not working - any help please?
Public Function CheckIfBorders(cellTargetCell As Variant) As String
CheckIfBorders = "Site Name - NO"
If Range(cellTargetCell).Borders(xlEdgeBottom).LineStyle <> xlNone Then
If Range(cellTargetCell).Borders(xlEdgeTop).LineStyle <> xlNone Then
CheckIfBorders = "Site Name OK"
End If
End If
I have a spreadseet where in column A I have values I need to test.
It looks like this:
-- removed inline image ---
What I need is a test in column B - to identify sites - in this case: Paris, Dublin, Berlin. I'm trying to write a function to be called out in column B - to identify cells which has up/down borders - to find "site names".
What I have so far is not working - any help please?
Public Function CheckIfBorders(cellTargetCell As Variant) As String
CheckIfBorders = "Site Name - NO"
If Range(cellTargetCell).Borders(xlEdgeBottom).LineStyle <> xlNone Then
If Range(cellTargetCell).Borders(xlEdgeTop).LineStyle <> xlNone Then
CheckIfBorders = "Site Name OK"
End If
End If