google / open-location-code

Open Location Code is a library to generate short codes, called "plus codes", that can be used as digital addresses where street addresses don't exist.
https://plus.codes
Apache License 2.0
4.06k stars 472 forks source link

Decode gives #VALUE error #416

Closed jayeshkumars closed 3 months ago

jayeshkumars commented 3 years ago

image =OLCDecode(code) is giving a #VALUE error in excel.

bilst commented 3 years ago

Hi Kumar, if you're using the VBA library in Excel, you might try OLCDecode2Array(), which has the comment, "Same as OLCDecode but returns the coordinates in an array, easier to use within Excel."

Hopefully that works, but if not can you share the plus code you're trying to convert (hard to read the screenshot). Also if you highlight the cell with #VALUE!, is there any more detailed error message it shows that you can share?

RiverMersey commented 3 years ago

image

jayeshkumars commented 3 years ago

Hi Kumar, if you're using the VBA library in Excel, you might try OLCDecode2Array(), which has the comment, "Same as OLCDecode but returns the coordinates in an array, easier to use within Excel."

Hopefully that works, but if not can you share the plus code you're trying to convert (hard to read the screenshot). Also if you highlight the cell with #VALUE!, is there any more detailed error message it shows that you can share?

Worked like a charm, when referred to a cell! The formula not accepting the direct input. Plus code to decode: 7M3JHPXM+X8 (in Cell A1) =OLCDecode(A1) returns #VALUE! =OLCDecode2Array(A1) returns the array (Solves the purpose)

But, =OLCDecode(7M3JHPXM+X8) or =OLCDecode2Array(7M3JHPXM+X8)

Doesn't work, excel wouldn't accept the + sign, even if I put it in quotes("").

shmootker commented 3 years ago

When I try the OLCDecode2Array(A1) I get just the Latitude value 11.599875 in this example. How do I get the other values that are supposed to be provided like the longitude value to show up in Excel? I've tried selecting columns and rows before entering the function as is described in Excel but all it does is just repeat the latitude value and not the other values of the array.