[Solved] SUMIF doesn't count rows with X

Discuss the spreadsheet application
Locked
MarkinPA
Posts: 8
Joined: Sat Jul 14, 2018 7:24 pm

[Solved] SUMIF doesn't count rows with X

Post by MarkinPA »

Hello.
I have a spreadsheet with 'X' in some cells and I want to sum the rows or columns to see how many contain an 'X'.

Lot of stuff posted on SUMIF but I can't get mine to work.

=SUMIF(B2:Q2;"X") returns 0 in all cases.
=SUMIF(B2:Q2;'X') returns 0 in all cases.
=SUMIF(B3:Q2;"=X") returns #NAME?
=SUMIF(B3:Q2;'=X') returns #NAME?
=SUMIF(B2:Q2,'X') returns err:508
=SUMIF(B2:Q2,'X') returns err:508

Help!
Last edited by Hagar Delest on Wed Feb 12, 2025 8:55 am, edited 1 time in total.
Reason: tagged solved.
Open Office 4.1.5 Win 8.1 & 10
User avatar
floris v
Volunteer
Posts: 4635
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: SUMIF Not Working.

Post by floris v »

Try COUNTIF (B2:Q2;"X") instead. SUMIF works on linked columns, adding only the values in a column that are in a row where another cell meets some condition.
LibreOffice 25.8.4.2 on Ubuntu Linux
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
User avatar
robleyd
Moderator
Posts: 5505
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: SUMIF Not Working.

Post by robleyd »

SUMIF is for adding numbers; you want to count the number of occurrences so try COUNTIF.
Slackware 15 (current) 64 bit
Apache OpenOffice 4.1.16
LibreOffice 26.2.3.2; SlackBuild for 26.2.3 by Eric Hameleers
---------------
I hate this damn computer, I wish that I could sell it.
It won't do what I want it to, Only what I tell it.
MarkinPA
Posts: 8
Joined: Sat Jul 14, 2018 7:24 pm

Re: SUMIF Not Working.

Post by MarkinPA »

Thank you! COUNTIF Worked fine.
Open Office 4.1.5 Win 8.1 & 10
Locked