[Solved] Formula

Discuss the spreadsheet application
Post Reply
Candice27
Posts: 4
Joined: Tue Jan 16, 2018 11:19 am

[Solved] Formula

Post by Candice27 »

Hi All !!

I'm new to OO and to doing formula's.. and so I need some help please..

I'm trying to do a simple spreadsheet that adds up the total of optical frames by suppliers name that have been sold, at the bottom of the page next too the suppliers name.

Optimate 2
Moscon 2


I have very little, to no knowledge on how to do this? Please could you let me know how the sum should look in the cell.
PS. I can't get the red lines under the words to go away either :?: :?
Attachments
help1.pdf
(119.97 KiB) Downloaded 76 times
Last edited by Hagar Delest on Sat Jan 27, 2018 7:53 pm, edited 1 time in total.
Reason: tagged [Solved].
OpenOffice 4.1.3
Windows XP
FJCC
Moderator
Posts: 9277
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Formula

Post by FJCC »

If you want to count how many times each supplier's name appears in column D, use a formula like

Code: Select all

=COUNTIF(D8:D20;"Optimate")
or

Code: Select all

=COUNTIF(D8:D20;A25)
where cell A25 contains the text Optimate.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Candice27
Posts: 4
Joined: Tue Jan 16, 2018 11:19 am

Re: Formula

Post by Candice27 »

Thank you, but I'v tried both and get a zero in the cell?
OpenOffice 4.1.3
Windows XP
FJCC
Moderator
Posts: 9277
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Formula

Post by FJCC »

If you could post an example file, we could see what is going wrong. To do that, click Post Reply then look for the Upload Atachment tab just below the box where you type a response.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
User avatar
Lupp
Volunteer
Posts: 3553
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Formula

Post by Lupp »

Allways attach "the "real thing" (OpenOffice document), not an image or pdf of it, except the question is explicitly about the view or the export.

(Just a hunch:)
There are two frequently occurring issues suspectable here:
-1- Your supplier names may possess trailing spaces.
-2- What you assume to be numbers is actually texts consisting of decimal digits, and thus looking like numbers.

As I suppose you didn't want to just count the number of rows containing a specific supplier, but to sum the respective numbers, I would suggest you study the attached example.

To be clear: If the cause of the problem actually is -1- or -2-, dont't leave it at that, but make sure that texts needing comparison NOT contain additional and or trailing whitespace, and that content being expected to be numbers actually IS numbers in the technical sense.

Please come back with respective questions if applicable.
Attachments
aoo91979SumIf_Issue_1.ods
(11.09 KiB) Downloaded 60 times
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
Candice27
Posts: 4
Joined: Tue Jan 16, 2018 11:19 am

Re: Formula

Post by Candice27 »

Here are the example files.
Attachments
doc2.ods
(11.12 KiB) Downloaded 60 times
doc1.ods
(11.13 KiB) Downloaded 68 times
OpenOffice 4.1.3
Windows XP
User avatar
keme
Volunteer
Posts: 3704
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: Formula

Post by keme »

Typical mistake(*): There is a trailing space in the "Optimate" entries, which is missing in the summation table. While "Optimate" and "Optimate " looks the same to you and me, the software sees them as different.

Use data validation to improve input.

Note that pasting into cells may defeat validation settings. For more secure integrity checking you may need to create an input form.

(*) IOW: You are not the first to do this, nor will you be the last. Those invisible (leading and trailing) spaces have their ways of sneaking into our data.
Candice27
Posts: 4
Joined: Tue Jan 16, 2018 11:19 am

Re: Formula

Post by Candice27 »

How would i do a data validation ?
OpenOffice 4.1.3
Windows XP
User avatar
Hagar Delest
Moderator
Posts: 32664
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Formula

Post by Hagar Delest »

Menu Data>Validity.

Please add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
Post Reply