I have a spreadsheet that has a column with IP addresses. I now need to populate another column with the country that IP is registered to.
Ideally I would simply put some code like a short HTML line or a hyperlink in an adjacent column like: http://api.hostip.info/flag.php?ip=xxx.xxx.xxx.xxx, where xxx.xxx.xxx.xxx would be the cell that contains the IP. I have 2 problems with this approach right now though. The first is that I would like Excel to show me the "output of that hyperlink right there in the cell rather than trying to open a browser window. The second problem is inserting the cell reference into the hyperlink, like G3, without the hyperlink literallt becoming http://api.hostip.info/flag.php?ip=G3.
The other way I was looking at accomplishing this was to compare the IPs in the G column against another spreadsheet I got with all known IP number ranges and their respective countries. The problem with that is after I convert that IP address into a unique IP number, I don't know how to compare that against the entire columns of the other spreadsheet. How do I test whether the IP number whose owning country I am looking for falls between a number falls between a number in column A and column B of the same row in the other speadsheet.
Any help would be greatly appreciated.