Sub Get_Conditional_Links()
Dim IE As New InternetExplorer, HTML As HTMLDocument
Dim post As Object, elem As Object, newlink As String
Dim linklists As Variant, link As Variant
linklists = [{"http://www.innovaprint.com.sg/","https://www.plexure.com.sg/","http://www.mount-zion.biz/","http://www.cityscape.com.sg/"}]
For Each link In linklists
With IE
.Visible = True
.navigate link
While .Busy = True Or .readyState < 4: DoEvents: Wend
Set HTML = .document
End With
For Each post In HTML.getElementsByTagName("a")
If InStr(1, post.innerText, "contact", 1) > 0 Then newlink = post.getAttribute("href"): Exit For
Next post
If newlink = "" Then '''this is the fix
For Each elem In HTML.getElementsByTagName("a")
If InStr(1, post.innerText, "about", 1) > 0 Then newlink = post.getAttribute("href"): Exit For
Next elem
End If
R = R + 1: Cells(R, 1) = newlink
Next link
End Sub