**This is how you can fix the Calc spreadsheet error 502.**

If you are an avid user of spreadsheet programs such as Excel, Calc in OpenOffice or LibreOffice, you might have encountered the **Err:502** while performing calculations using functions. Here’s how you can fix it.

## What is Err 502

As the Calc manual says – it occurs when – “A function argument has an invalid value or invalid function argument”. It can happen to any function if you are passing invalid arguments which it was not supposed to receive.

## How to fix Err 502

A typical way to fix this error is – check each and every function and its parameters which you are passing. Likely you are providing some incorrect argument that is causing this error.

See some examples below.

## Examples

- If you pass a negative number to SQRT (square root) function – Error 502 would be thrown by Calc. Because it expects a positive number and you are passing a negative.

- If you are using VLOOKUP and trying to return some value from the column, but the column number doesn’t exist in the selected table, you would get Error 502.

## Conclusion

Almost all functions can return Error 502 if you pass an invalid argument. Carefully checking your spreadsheet to find out about the error assessing the arguments is the recommended way to solve this problem.

#### Summary

Time needed: 5 minutes.

How to fix Error 502 in Calc

**Select the Cell in Calc which contains the Err 502**Select the cell

**Analyze the function**Analyze the argument of the functions or functions (in case of nested formula) and change the arguments.

**Run your formula**Recalculate Calc formula to eliminate Err 502.

Are you facing the Error 502 problem and unable to solve it? Drop a comment below for help.

#### Looking for something else?

Read our complete tutorial index of Calc, Writer, Impress and Draw.

**Be an expert on LibreOffice.**

**Small and quality tutorials. Delivered. Thrice a week.**

I’m getting a 502 error but only for data from the 14th column and after. All data in columns 1-13 works perfectly. Is there a limit to the number of columns VLOOKUP will handle?

There is no limit for number of columns in VLOOKUP. Check your source array and column numbering.

Huh… I honestly don’t see anything “wrong” with it. I’ve literally copy-n-pasted the VLOOKUP argument so I know it’s identical, except for the column from which it’s pulling that cell’s requested data.

Here’s what I’ve got:

`=IF(H6=0,"",(VLOOKUP(H6,$'Data Lookup'.A:$'Data Lookup'.M,14,0)))`

Everything stating M.13.0 and less (down to M.2.0, since M.1.0 is the initial search criterion) works perfectly. Just 14 and up do not work and return the 502 error.

This spreadsheet has six sheets to it.

The first sheet is a data entry sheet, where I type in the store number (along with first day of that week and team members I’m working with), and it’s broken out to give me five days, and then these are grouped into four groups (i.e. four weeks).

The second, third, fourth, and fifth sheets are weekly result tables which I can print.

The sixth sheet is the Data Lookup sheet, and it’s a massive table of store numbers (first field) and then all the other pertinent data for each of those stores (district, phone number, address, and so on).

Ok, someone on another message board I’m on figured it out. Evidently, the “M” refers to the last column looked at by VLOOKUP. As I was trying to pull data from beyond that column, that’s what was causing the error.

I changed “M” to “Z” and the problem is now solved.

I don’t understand. I’m getting this error.

I have a cell with “00:47:05” in it. It’s in position B5. When I do the function “=TIMEVALUE(B5)” I get error 502, but when I do the function “=TIMEVALUE(“00:47:05″)” I get the converted value.

I

cannotseriously be expected not to use a cell within a function in a spreadsheet program. Hell, I have seen such being described here. Something is wrong, and I don’t know what it is.