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).
Tech Support 24/7
Ask a Tech Specialist Online
Connect with the Expert via email, text or phone. Include photos, documents, and more. Get step-by-step instructions from verified Tech Support Specialists.
On this page, you will find more information about the most common causes and most relevant solutions for the LibreOffice Calc error ‘502’. Do you need help straight away? Visit our support page.
Error information
What causes the 502 error?
The LibreOffice documentation indicates that error code ‘502’ is caused by the following problem: «Function argument is not valid. For example, a negative number for the SQRT() function, for this please use IMSQRT().».
Do you think there is another cause for this error? Let others know in the comments.
Tech Support 24/7
Ask a Tech Specialist Online
Connect with the Expert via email, text or phone. Include photos, documents, and more. Get step-by-step instructions from verified Tech Support Specialists.
On this page, you will find more information about the most common causes and most relevant solutions for the LibreOffice Calc error ‘502’. Do you need help straight away? Visit our support page.
Error information
What causes the 502 error?
The LibreOffice documentation indicates that error code ‘502’ is caused by the following problem: «Function argument is not valid. For example, a negative number for the SQRT() function, for this please use IMSQRT().».
Do you think there is another cause for this error? Let others know in the comments.
Tech Support 24/7
Ask a Tech Specialist Online
Connect with the Expert via email, text or phone. Include photos, documents, and more. Get step-by-step instructions from verified Tech Support Specialists.
Need more help?
Do you need more help?
Tech experts are ready to answer your questions.
Ask a question
From The Document Foundation Wiki
- Главная
- Разработка
- Дизайн
- QA
- События
- Документация
- Сайт
- Локализация
- Accessibility
- Маркетинг
- Diversity
- Wiki справка
- Документация
- Публикации
- Сторонняя документация
- ЧаВо
- HowTo
- Macros
- Документация для разработчиков
- Главная
- Общие
- Writer
- Calc
- Impress
- Draw
- Math
- Base
Что означают коды ошибок (Err: NNN ) в электронных таблицах LibreOffice?
| Код ошибки | Текст | Описание |
|---|---|---|
| #### | any | Ячейка недостаточно большая для отображения всего содержимого. См. Как просмотреть содержимое ячейки, в которой отображается ###. |
| 501 | Invalid character | Не верный символ для этого контекста. Например:=1¤2 вместо =1E2. |
| 502 | Invalid argument | Аргумент функции имеет неправильное (недопустимое) значение. Например: отрицательное значение для функции извлечения корня. |
| 503 #NUM ! |
Incorrect floating point operation | Результат вычисления находится вне определенного диапазона значений. |
| 504 | Error in parameter list | Параметр функции имеет неверный тип. Например: текст вместо числа или ссылка на диапазон ячеек вместо ссылки на одну ячейку |
| 505 | Internal syntax error | Не используется |
| 506 | Incorrect decimal point | Не используется |
| 507 | Error : missing pair | Не используется |
| 508 | Error : missing pair | Закрывающая скобка без открывающей скобки или пропавшая закрывающая скобка в середине формулы (отсутствующая скобка в конце формулы добавляется автоматически). |
| 509 | Missing operator | Отсутствует оператор. Например: в формуле =2(3+4) отсутствует математический оператор (*, /, + или -) между цифрой «2» и открывающей скобкой «(«. |
| 510 | Missing variable | Недостающая переменная. Два оператора, где второй не является унарным оператором, следуют друг за другом. Например: =1+*2. |
| 511 | Missing variable | Недостающая переменная. Функция требует большего количества переменных, чем указано. Например: для операторов AND() и OR() не указаны параметры. |
| 512 | Formula too long | В компиляторе: это относится к внутреннему числу битов (512 максимум), которое не имеет ничего общего с длиной символьной строки в формуле, но зависит от количества операторов, переменных, скобок и т.д. в формуле. В интерпретаторе: формулы, которые генерируют слишком много матриц сразу (150 максимум) и основные функции, которые получают в качестве параметров массив, который слишком велик (OxFFE максимум в 65534 октета). |
| 513 | Character string too long | В компиляторе: идентификатор в формуле содержит более 255 символов. В интерпретаторе: результат операции над строкой символов содержит более 255 знаков. |
| 514 | Internal capacity exceeded | Операции сортировки со слишком большим количеством данных (максимум доступно 100 000) или данные, которые превышают стек вычислений |
| 515 | Internal syntax error | Не используется |
| 516 | Internal syntax error | Стек расчета должен содержать матрицу, но её не существует. |
| 517 | Internal syntax error | Неизвестный код операции. Например: документ, содержащий новую функцию, открыт в старой версии программного обеспечения, которая не содержит эту её. |
| 518 | Internal syntax error | Переменная должна появиться из стека вычислений, но её там нет. |
| 519 #VALUE ! | No result | Функция не может поставить значение, соответствующее определению, или одна из ячеек, на которую ссылается формула, содержит текст вместо числа |
| 520 | Internal syntax error | Компилятор сгенерировал код, который не может быть интерпретирован. |
| 521 | Internal syntax error | Нет результата в стеке вычисления. |
| 522 | Circular reference | Формула делает прямую или косвенную ссылку на саму себя и в меню Сервис ▸ Параметры ▸ LibreOffice Calc ▸ Вычисления не были активированы итерации. |
| 523 | The calculation does not converge | Статистические (финансовые) функции стремятся к заданному значению, но не достигают его, или итерация ссылок в цикле не достигает минимального изменения в рамках определенных шагом максимальных |
| 524 #REF ! |
Incorrect reference | В компиляторе: заголовки строк или столбцов не обнаружены. В интерпретаторе: формула ссылается на ячейку, столбец, строка или таблица которой были удалены или не входили в таблицу. |
| 525 #NAME ? |
Incorrect name | В компиляторе: система не может активировать идентификатор (нет ссылки, имени секции, заголовка строки или столбца, макроса, и так далее). В интерпретаторе: то же самое в течение всего периода выполнения. Например: функция Basic или надстройка недоступны. |
| 526 | Internal syntax error | Это уже не используется, но может произойти в старых документах, если результатом формулы был диапазон. |
| 527 | Internal capacity exceeded | В интерпретаторе: Чрезмерная вложенность ссылок (ячейка ссылается на ячейку, которая ссылается на ячейку, которая ссылается на ячейку и т.д.). |
| 532 #DIV/0 ! |
Division by zero | Оператор делений «/», где знаменатель равен «0» Другие функции могут возвращать эту ошибку. Например: VAR.P с менее чем 1 аргументом ECARTYPEP менее чем 1 аргументом VAR менее чем 2 аргументами ECARTYPE менее чем 2 аргументами CENTREE.REDUITE с ECARTYPE=0 LOI.NORMALE с ECARTYPE=0 |
Такая проблема:есть основной файл, в который собирается информация из стороннего файла,и в этом основном файле,первоначально при открытии, в некоторых ячейках отображается ошибка 502. Допустим,если пробовать внести изменения в какую-нибудь ячейку, то файл как бы обновляется и всё отображается нормально.Вроде мелочь,можно и так работать, но суть в том, что информации в основном файле много и, когда надо быстро скопировать готовый отчет,забываешь,что там изначально отображается эта ошибка 502 и копируешь с ошибкой и получаешь недовольство начальства.
Примечание: когда открыт сторонний файл откуда собирается информация и после этого открываешь основной файл информация сразу отображается корректно, а при закрытом первоначально идёт Ошибка 502 как описано выше.
Помогите пофиксить данную проблему,чтобы информация сразу отображалась корректно при закрытом стороннем файле.
P.s. Справа у меня вся информация собирается, а слева сцепляется в готовый отчет.
P.s.s. Извиняюсь за такие скрины, фоткал на работе, а там нет возможности перекинуть файл.
-
ralgith
- Posts: 7
- Joined: Mon Aug 29, 2011 5:11 pm

[Solved] Calc Err: 502
Ok, I know nothing, I repeat nothing about programming Spreadsheets. The sheet in question is something I downloaded.
The original sheets in Office 2k7 format can be found here:
http://www.classicbattletech.com/forums … topic=1219
Using that and a copy I converted to Office 2k3 format I get the 502 error on several functions using Indrect to reference other sheets. The original author of the sheets posted this reply when I brought it up to him:
http://www.classicbattletech.com/forums … #msg228528
Now, I’d really like to get this working if I could. Thanks for any help ahead of time!
OO.o version in Sig.
Files can be found here (Contains both sheets that are having issues, both of them in Office 2k7 and Office 2k4 formats — I converted the 2k7 to 2k3 using the Official Converter from MS):
Download (folder link, has 4 files in it)
Last edited by Hagar Delest on Mon Sep 05, 2011 12:22 am, edited 1 time in total.
Reason: tagged [Solved].
OpenOffice 3.2.1 On Mandriva Linux
-
ralgith
- Posts: 7
- Joined: Mon Aug 29, 2011 5:11 pm
Re: Calc Err: 502
Post
by ralgith » Mon Aug 29, 2011 6:49 pm
I’m sorry, the Random <Mech/Vee> Generator sheet in the book is the one with the error. Cell H6. And I can’t work with the PDFs to use formulas/macros Its the 3rd from last sheet in the book for the Mechs, probably same for Vees. It occurs on both spreadsheets.
I should clarify the «converted» issue:
I used the convertor in order to try and use them in MS Office 2k3 under Crossover, this doesn’t work for me because when running under Crossover MS Office Excel 2k3 cannot load the Add-Ins that are needed in order for the sheets to work. Neither the original nor the converted work in OO, both give the 502 error on that Cell.
The sheet following the one I’m wanting fixed may also give errors, but I really don’t care about that sheet.
OpenOffice 3.2.1 On Mandriva Linux
-
gerard24
- Volunteer
- Posts: 958
- Joined: Sat Oct 30, 2010 5:12 pm
- Location: France
Re: Calc Err: 502
Post
by gerard24 » Mon Aug 29, 2011 7:03 pm
In H6, you have =VLOOKUP(G5;INDIRECT(F5);3)
F5 contains «MerPerGen30283050Assault». And if I hit Ctrl+F3, i don’t see this name…
LibreOffice 6.4.5 on Windows 10
-
ralgith
- Posts: 7
- Joined: Mon Aug 29, 2011 5:11 pm
Re: Calc Err: 502
Post
by ralgith » Mon Aug 29, 2011 7:10 pm
Once again, this does work in MS Office, it uses the final Sheet (Matrix) to figure out which sheet (based on F5) to perform the lookup from. But I’m not sure how this all works, since I don’t program the things myself. BigDuke66 from the link in 1st post does.
I’ve hit CTRL-F3 myself, and I don’t see a way to take that and pick one of the named sheets (In This Case it would be the sheet «Mercenary & Periphery 3028-3050» and lookup on the Assault table section from it using the number in G5 to match the range in that table’s column’s A&B
So does something need defined in the Matrix sheet for these codes then? And if so, how does it work in Excel w/out them?!
OpenOffice 3.2.1 On Mandriva Linux
-
Villeroy
- Volunteer
- Posts: 31099
- Joined: Mon Oct 08, 2007 1:35 am
- Location: Germany
Re: Calc Err: 502
Post
by Villeroy » Mon Aug 29, 2011 10:03 pm
=VLOOKUP(G5;INDIRECT(F5);3) looks up G5 in the range that is specified by name in cell F5 and returns the value from column 3 at the last position where column 1 is smaller than or equal to G5.
This works in Calc exactly as it works in Excel.
F1-Help on error codes wrote:502
Invalid argument
Function argument is not valid, for example, a negative number for the root function.
I put this in A1:C3
Select A1:C3 and type Named_Range into the name box left of the formula bar. Now this range is named «Named_Range»
I put the text «Named_Range» into F5
I put 1.5 in G5
I put your formula anywhere and it returns y. Wonderful.
Now I hit Ctrl+F3 and resize Named_Range to A1:B3 and since there is no 3rd column to return from, I get the 502 error.
Again, this works in Calc and Excel likewise:
http://www.techonthenet.com/excel/formulas/vlookup.php
techonthenet.com/excel/formulas/vlookup.php wrote:Note:
If index_number is less than 1, the VLookup function will return #VALUE!.
If index_number is greater than the number of columns in table_array, the VLookup function will return #REF!.
Excel returns #REF! whereas Calc returns a more specific numbered error.
Please, edit this topic’s initial post and add «[Solved]» to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
-
ralgith
- Posts: 7
- Joined: Mon Aug 29, 2011 5:11 pm
Re: Calc Err: 502
Post
by ralgith » Mon Aug 29, 2011 10:34 pm
You’re speaking greek. I’ll reiterate: I didn’t author these sheets. I don’t know how to do this stuff. It does work in Excel 2k3 and 2k7 as advertised when you go to Tools->Add-Ins and check all the ones needed for this. You only get the #REF! error when you don’t have the Add-Ins installed. Sometimes you’ll get a #NAME error also when you don’t have the proper Add-Ins. So, obviously something is different between the two.
So, telling me «it works» if you put it into some test sheet instead of looking at the huge book I’ve linked to that has several sheets and is doing these lookups across sheets using a special «Matrix» sheet and stuff… does not help me. It doesn’t work for OO.o, and I’m asking someone to figure out how its supposed to be so that it does work. Not try to point me in the right direction when I have no clue to start with on how this works, and I’m not interested in learning either.
OpenOffice 3.2.1 On Mandriva Linux
-
Villeroy
- Volunteer
- Posts: 31099
- Joined: Mon Oct 08, 2007 1:35 am
- Location: Germany
Re: Calc Err: 502
Post
by Villeroy » Mon Aug 29, 2011 10:41 pm
I don’t tell you «it works». I describe precisely how it is supposed to work and how I make it work in Calc or any other spreadsheet program such as Gnumeric and Excel.
According to my analysis there is at least one reason why this formula may throw error #502. According to the linked documentation on VLOOKUP in Excel, these sheets can not work in Excel nor Calc for the same reason.
If you have no clue, then you’ve got to use what works for you.
Please, edit this topic’s initial post and add «[Solved]» to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
-
TheGurkha
- Volunteer
- Posts: 6482
- Joined: Thu Mar 13, 2008 12:13 pm
- Location: North Wales, UK.
Re: Calc Err: 502
Post
by TheGurkha » Mon Aug 29, 2011 10:43 pm
ralgith wrote:You’re speaking greek. I’ll reiterate: I didn’t author these sheets. I don’t know how to do this stuff. It does work in Excel 2k3 and 2k7 as advertised when you go to Tools->Add-Ins and check all the ones needed for this. You only get the #REF! error when you don’t have the Add-Ins installed. Sometimes you’ll get a #NAME error also when you don’t have the proper Add-Ins. So, obviously something is different between the two.
So, telling me «it works» if you put it into some test sheet instead of looking at the huge book I’ve linked to that has several sheets and is doing these lookups across sheets using a special «Matrix» sheet and stuff… does not help me. It doesn’t work for OO.o, and I’m asking someone to figure out how its supposed to be so that it does work. Not try to point me in the right direction when I have no clue to start with on how this works, and I’m not interested in learning either.
Try to remember that this isn’t tech support. This is a forum peopled by volunteers — nothing official. You’ll get nowhere with spreadsheets unless you are willing to learn and put some time into understanding them.
-
Villeroy
- Volunteer
- Posts: 31099
- Joined: Mon Oct 08, 2007 1:35 am
- Location: Germany
Re: Calc Err: 502
Post
by Villeroy » Mon Aug 29, 2011 11:03 pm
Finally I got the document «3028-3050 Faction Assignment & Rarity Tables 8.06 MECHS.xls» (had some strange connection problems with mediafire) and opened the file in Gnumeric (which is more Excel compatible in some respect).
As a matter of fact there does not exist any range named «MerPerGen30283050Assault», so that VLOOKUP can not work. Just another case where people waste time with gaming rather than skills.
Please, edit this topic’s initial post and add «[Solved]» to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
-
ralgith
- Posts: 7
- Joined: Mon Aug 29, 2011 5:11 pm
Re: Calc Err: 502
Post
by ralgith » Tue Aug 30, 2011 12:25 am
Which doesn’t explain why so many people use this perfectly fine in Excel, including the author and myself. I just want it working under Linux so I can take my laptop to gaming sessions with me and randomly generate forces. In my case it isn’t wasting time gaming rather than skills… I write PHP programs for a living and do quite well with it. I simply have no interest in learning how to do spreadsheet programming. So, either someone will figure this out for me or I’ll just take 3d10 with me and roll on the charts manually I guess. I’m done.
Also, yes, I do realize this a community support forum staffed by volunteers. But that doesn’t mean that someone can’t still fix it for someone else who doesn’t have the time to learn because they don’t want to spend what precious little free time they have on such a thing rather than on enjoyable activities.
OpenOffice 3.2.1 On Mandriva Linux
-
RoryOF
- Moderator
- Posts: 34249
- Joined: Sat Jan 31, 2009 9:30 pm
- Location: Ireland
Re: Calc Err: 502
Post
by RoryOF » Tue Aug 30, 2011 12:32 am
This cuts both ways; why should we spend our precious free time (your choice of word) solving your problem, so you can go gaming? Cop yourself on!
I think an Admin should lock this thread.
Apache OpenOffice 4.1.14 on Xubuntu 22.04.2 LTS
-
ralgith
- Posts: 7
- Joined: Mon Aug 29, 2011 5:11 pm
Re: Calc Err: 502
Post
by ralgith » Tue Aug 30, 2011 2:16 am
Perhaps for the same reason that I give people the answers they need where I’m a forum Volunteer for a PHP based forum site. Because I know how to do it and they don’t. So no, it doesn’t cut both ways. You choose to volunteer here to answer questions/give help. As I choose to do so where I am a volunteer staff member. Now, I wonder how anyone gets any help here if you guys are always this rude. Dissing my one hobby just because I don’t want to learn spreadsheet programming is pretty up there in the rudeness department. That would be akin to your coming over to where I’m at and asking how to set permissions on your forum and me telling you that if you’re too lazy to figure it out with just a couple pointers then you shouldn’t be running a forum. Not everyone can learn everything. Instead of locking the thread, perhaps you could just ANSWER the frigging question w/out the rude comments. This is NOT how you run a support forum, community based or not.
OpenOffice 3.2.1 On Mandriva Linux
-
ralgith
- Posts: 7
- Joined: Mon Aug 29, 2011 5:11 pm
Re: Calc Err: 502
Post
by ralgith » Tue Aug 30, 2011 5:05 am
Yup, once I got past all the bickering rudeness I figured it out. But I didn’t do it alone. I got help from somewhere else as well as this and combined the two. Its nice to have friends who have friends who know how to do stuff. The rudeness wasn’t necessary, and because of it I’ll find my help elsewhere from now on.
Thanks to those who actually made an honest effort to help, even if I didn’t know what you were talking about, and sod off to those who were rude.
OpenOffice 3.2.1 On Mandriva Linux

