Hello I am parsing some data from other website using this Request :
Public Function giveMeValue(ByVal link As Variant) As Variant
Set htm = CreateObject("htmlFile")
With CreateObject("msxml2.xmlhttp")
.Open "GET", link, False
.send
htm.body.innerhtml = .responsetext
End With
If Not htm.getelementbyId("JS_topStoreCount") Is Nothing Then
giveMeValue = htm.getelementbyId("JS_topStoreCount").innerText
Else
giveMeValue = "0"
End If
htm.Close
Set htm = Nothing
End Function
with the function on the cell =giveMeValue(A1)
now I need to apply some formatting condition to copied value but I am unable to do it with the excel conditional formatting
The active cell "B" column
- Less than 10 Red
- Between 10 and 15 Yellow
- More than 15 Green
Aall the cell not returning any number should be blank , please consider the =giveMeValue(A1)
return as string
As Integer
rather thanAs String
, if you know that the return would always be convertible to anInteger
? I guess the problem is that conditional formatting doesn't recognize the number because it's returned as a string, as you correctly say. – Matteo NNZ=VALUE(...)
in a conditional format rule. – KekuSemau