open-location-code icon indicating copy to clipboard operation
open-location-code copied to clipboard

Decode gives #VALUE error

Open jayeshkumars opened this issue 5 years ago • 4 comments

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

jayeshkumars avatar Oct 14 '20 07:10 jayeshkumars

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?

bilst avatar Oct 14 '20 20:10 bilst

image

RiverMersey avatar Oct 14 '20 20:10 RiverMersey

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("").

jayeshkumars avatar Oct 15 '20 03:10 jayeshkumars

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.

shmootker avatar Nov 20 '20 20:11 shmootker