Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- say cell A1 had two words for search query e.g. android developer
- that needs url encoding to handle the space between words:
- VBA:
- "https://www.googleapis.com/customsearch/v1?alt=json&cx=016252715861662448569:taxvfdziuic&num=10&start=1&key=AIzaSyCoBjCX0YPbKfNin3tvaQxdl8aEGBH56Ec&q=" & Application.encodeURL("android developer")
- which gives:
- "https://www.googleapis.com/customsearch/v1?alt=json&cx=016252715861662448569:taxvfdziuic&num=10&start=1&key=AIzaSyCoBjCX0YPbKfNin3tvaQxdl8aEGBH56Ec&q=android%20developer"
- You then do the request against that
- .Open "GET", "https://www.googleapis.com/customsearch/v1?alt=json&cx=016252715861662448569:taxvfdziuic&num=10&start=1&key=AIzaSyCoBjCX0YPbKfNin3tvaQxdl8aEGBH56Ec&q=android%20developer", False
- You can do that in the sheet with =ENCODEURL("words to be joined go here")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement