nslookup and dig in excel for mac
on run
tell application "Microsoft Excel"
tell sheet "Sheet1" of workbook 1
set EndofRow to 333 -- This defines the last Excel Row with data; it this example, it is A333.
set input_data to ""
repeat with i from 1 to EndofRow -- This loop will run from row 1 until EndofRow set above. For this example, it was set to 333.
set InputCell to the value of (cell i of range ("A1:A" & i)) -- This line defines the range, where in this example it is set A1:A333 and i is the counter and will continue to loop until EndofRow.
set input_data to InputCell
set encoded_data to do shell script "dig +short " & input_data -- This is the resolver
set EncodedCell to ("B" & i) -- This is where to designate where the encoded data is to appear. In this example, the encoded data will be in Column "B".
set value of cell EncodedCell to encoded_data
end repeat
end tell
end tell
end run