[Solved] #NAME? error in Spreadhsheet

Discuss the spreadsheet application
Post Reply
06honda
Posts: 4
Joined: Wed Nov 18, 2020 4:03 pm

[Solved] #NAME? error in Spreadhsheet

Post by 06honda »

2nd Speadsheet.jpg
I have been using Open Office for tracking my stock holdings and it has worked quite good until recently. I added a stock holding recently purchased and entered the Forumlas as per the rest of course using the correct number for the line its on. I have this error in one box only: #NAME? see screen grab and one of a different spreadsheet where it works.

1. 2nd Spreadsheet where forumula works 2. Spreadsheet where forumula gives error #NAME?
Attachments
Error Cell (1).jpg
Last edited by MrProgrammer on Wed Dec 02, 2020 5:28 pm, edited 5 times in total.
Reason: Moved topic from Math forum to Calc
Apache Open Office 4.0.1
OS X EI Captain
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Open Office Stock Tracking Spreadhsheet

Post by John_Ha »

What formula do you have in O14?

It should be

Code: Select all

=SUM(O1:O13)
Search Help with NAME to discover a description of the error.
Clipboard01.png
Showing that a problem has been solved helps others searching so, if your problem is now solved, please view your first post in this thread and click the Edit button (top right in the post) and add [Solved] in front of the subject.
Last edited by John_Ha on Wed Nov 18, 2020 5:13 pm, edited 1 time in total.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
MrProgrammer
Moderator
Posts: 4907
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Open Office Stock Tracking Spreadhsheet

Post by MrProgrammer »

Hi, and welcome to the forum.
06honda wrote:I have this error in one box only: #NAME?
Your formula in O14 is =IF(«SomeTest»;«ValueIfTrue»;«ValueIfFalse») where «ValueIfFalse» is the term error. But error is not defined in that spreadsheet, so you receive a #NAME? message in the cell. Do you perhaps want "error" with quotes instead of error? Be sure to use double quotes and not single quotes. If you want to use error (no quotes) you must define the term using Insert → Names → Define before you can use it.

For any further assistance, attach a document demonstrating the difficulty (remove confidential information then use Post Reply, not Quick Reply, and don't attach a picture instead of the document itself). Do this whether your question is about the spreadsheet with the #NAME? error or if it is about the one without the #NAME? error. Attach the spreadsheet (or both) about which you are asking. It will help you get your problem solved more quickly than a picure will.
 Edit: Thank you for the attachment below. After looking at it, I see that your formula in O10 should be =C10+F10+H10+L10, not =SUM(C10+F10+I10+L10). Skipping H10 is wrong, and you don't need to use SUM() since you are adding with the plus signs thus there only a single term, that total between the parentheses, for the function to sum. Your use of the unquoted error term in O14 is still incorrect though. You can just add quotes around it, but it would be better to describe exactly what needs attention, perhaps "Row totals do not equal column totals"
If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the subject field. Select the green checkmark icon at the same time.

[Tutorial] Ten concepts that every Calc user should know
[Tutorial] Mac FAQ
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
06honda
Posts: 4
Joined: Wed Nov 18, 2020 4:03 pm

Re: Open Office Stock Tracking Spreadhsheet

Post by 06honda »

John_Ha wrote:What formula do you have in O14?
It should be

Code: Select all

=SUM(O1:O13)
Formula in O14 is =IF(SUM(O5:O13)=SUM(C14:N14);SUM(O5:O13);error)
Apache Open Office 4.0.1
OS X EI Captain
06honda
Posts: 4
Joined: Wed Nov 18, 2020 4:03 pm

Re: #NAME? error in Stock Tracking Spreadhsheet

Post by 06honda »

See attached spreadsheets. Error is on 2nd sheet called: Non-Reg Account Dividends 2020
Attachments
2020StockTracker Copy.ods
(43.91 KiB) Downloaded 142 times
Apache Open Office 4.0.1
OS X EI Captain
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: #NAME? error in Stock Tracking Spreadhsheet

Post by RusselB »

The last term in your IF statement is stipulated as error
Since error is not enclosed in quotation marks ("), Calc looks for a function named error.
Since error isn't a built-in function or, in this case, a custom coded function, Calc doesn't find a function called error, thus it reports back an error message that stipulates that the function name can't be found.
The easiest method is to put the word error (which is the last term in the IF statement) into quotation marks, making the code

Code: Select all

=IF(SUM(O5:O13)=SUM(C14:N14);SUM(O5:O13);"error")
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
06honda
Posts: 4
Joined: Wed Nov 18, 2020 4:03 pm

Re: [Solved] #NAME? error in Spreadhsheet

Post by 06honda »

Wasn't able to figure it out but thanks for all you help.
Apache Open Office 4.0.1
OS X EI Captain
Post Reply