[Solved] SUMIF returning 0

Discuss the spreadsheet application
Post Reply
kineticviscosity
Posts: 1
Joined: Tue Mar 22, 2011 10:16 pm

[Solved] SUMIF returning 0

Post by kineticviscosity »

Edit: turned out it was a stupid problem, there were white spaces after each number which meant even though it formatted the cells as numbers, Calc was unable to read them as such.

Hi,

I've spent a while trawling forums and help pages to try and solve this to no avail.

I have a spreadsheet with a column of numbers. Beside each number is its associated category. I want to total the numbers in each category.

For this task I picked 'SUMIF', =sumif(range;criteria;sum_range)

My range is the list of categories by each number, i.e. $F$20:$F$50
My criteria is a cell containing one of the categories, i.e. F2 - where F2 contains the word: Accommodation
My sum_range is the list of numbers to sum, i.e. $E$20:$E$50

Completed formula:

=sumif($F$20:$F$50;F2;$E$20:$E$50) - which returns 0

The formula result returns 0 and I can't understand why as from everything I've read this should work. If I put = before F2 in criteria it returns an error, i.e. =F2.

I've had a look at previous SUMIF questions but none seems to show a way to perform this fairly simple application. It's probably something stupid and if so I apologise but I can't find the problem.
Openoffice 3.3.0 build 9567
Windows 7 64-bit

Nu
User avatar
Villeroy
Volunteer
Posts: 31363
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: SUMIF returning 0

Post by Villeroy »

menu:View>Highlight Values [Ctrl+F8]
Column "Qty" does not contain any numbers.
You entered these figures with a wrong decimal separator. Replace the points with commas.
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
User avatar
JohnSUN-Pensioner
Volunteer
Posts: 876
Joined: Fri Jan 14, 2011 1:21 pm
Location: Kyiv, Ukraine

Re: SUMIF returning 0

Post by JohnSUN-Pensioner »

Welcome to the forum!
It's simple: the first column is not the number values.

Villeroy wrote:menu:View>Highlight Values [Ctrl+F8]
Replace the points with commas
... and remove the spaces after the numbers
I may not have a lot to give but what I got I'll give to you...
Apache OpenOffice 4.1.5, LibreOffice 6.4.4.2 (x64) on Windows 7
If you think that I did not answer your question, make allowances for my imperfect English
Post Reply