I am an Excel and Xpath noob (well, at least I am honest!). I am working on a project that, at present, I have got working through learning from online tutorials. However, the next step has me stumped!
I am hosting a document on Google Sheets and as such, want to try and avoid VBA (which I have no idea about yet, anyway.....) and hope I can multi function/formula in one cell instead.
I am using Xpath to populate a cell with an input from an XML document. The function is:
=ImportXML("https://api.eveonline.com/corp/StarbaseList.xml.aspx?keyID=*******&vCode=***********","//row[@itemID='*******']/@state")
There are only two possible cell outputs from this function - "1" or "4" and currently have this working fine.
However, I require to change the cell display from "1" to "OFFLINE" in red text, and "4" to "ONLINE" in green text, but do not even know where to begin doing this.......
Any help would be appreciated.
=IF(ComparisonHere = 1, "OFFLINE", "ONLINE")
? In context -=IF(ImportXML("https://api.eveonline.com/corp/StarbaseList.xml.aspx?keyID=*******&vCode=***********","//row[@itemID='*******']/@state") = "1", "OFFLINE", "ONLINE")
- then useconditional formatting
to change the colours. Only because you're certain there are only two outputs, if a 2 or 3 could be output you'll need a condition check to be sure it's returned a 4.