[Solved] SUMIF not adding based on day of week

Discuss the spreadsheet application
Locked
boydfritsch
Posts: 3
Joined: Wed Mar 12, 2025 10:40 pm
Location: Napoleon, Ohio

[Solved] SUMIF not adding based on day of week

Post by boydfritsch »

This should be simple... But.....
Column B is the day of the week. Column C is the sales for that day.
Current formula is: =SUMIF(B3:B367;"=Monday";C3:C367).
With or without the = the sum provided is $0.00. If it matters.. The cells are formatted as $1,234.56
Example Data Entered - Wednesday $120.00

Sum Shows:
Sunday        $0.00
Monday        $0.00
Tuesday       $0.00
Wednesday     $0.00
Thursday      $0.00
Friday        $0.00
Saturday      $0.00
Total         $0.00
Attachments
Store Sales.ods
(23.79 KiB) Downloaded 77 times
Last edited by MrProgrammer on Mon Mar 17, 2025 3:28 pm, edited 4 times in total.
Reason: Tagged ✓ [Solved]
OpenOffice - 4.1.15
Windows 10
User avatar
MrProgrammer
Moderator
Posts: 5430
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Sumif not adding based on text from another cell.

Post by MrProgrammer »

Hi, and welcome to the forum.
boydfritsch wrote: Wed Mar 12, 2025 11:01 pm If it matters.. The cells are formatted as $1,234.56
It doesn't matter how the cells are formatted. The cell values determine the formula result. Formatting and values are completely separate cell properties. Only numeric values can be summed. All text values are ignored. If all of your values in column C are text, the sum will always be zero. Read section 1. Types of data in Ten concepts that every Calc user should know.

If you need any additional assistance attach a spreadsheet demonstrating the difficulty (remove confidential information then use Post Reply, not Quick Reply, and don't attach a picture instead of the spreadsheet itself). I will not help further unless you attach a spreadsheet document.

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.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
boydfritsch
Posts: 3
Joined: Wed Mar 12, 2025 10:40 pm
Location: Napoleon, Ohio

Re: SUMIF not adding based on text from another cell

Post by boydfritsch »

3 sheets... I'll work on the summary sheet later.
All data in Column C are sales for that particular day. Spreadsheet attached.
Column A is the date
Column B is a formula converting the Date to the Day
Column C is the sales for that particular day, manually entered
There are other columns for the city they live in.

I Do Appreciate Your Assistance.
OpenOffice - 4.1.15
Windows 10
User avatar
karolus
Volunteer
Posts: 1243
Joined: Sat Jul 02, 2011 9:47 am

Re: SUMIF not adding based on text from another cell

Post by karolus »

Hallo
instead your false positive WEEKDAY-formula use

Code: Select all

=TEXT(A3;"DDDD")
the rest is done by ⇒ Data ⇒ Pivottable ⇒ create… , and bit of »drag & drop« to the right place…
see attached file with some Dummy-data
Store Sales_Pivot.ods
(40.69 KiB) Downloaded 88 times
Libreoffice 25.2… on Debian 13 (trixie) (on RaspberryPI5)
Libreoffice 25.8… flatpak on Debian 13 (trixie) (on RaspberryPI5)
User avatar
MrProgrammer
Moderator
Posts: 5430
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: SUMIF not adding based on text from another cell

Post by MrProgrammer »

Column B contains WEEKDAY formulas. That function returns numeric values.
[Tutorial] Calc date formulas, section W
Your =SUMIF(B3:B367;"=Monday";C3:C367) formula looks for the text string Monday in the numeric values of column B. Of course the sum is zero.

You should use a pivot table to summarize the data. Then you can immediately get the result you want without writing any formulas.
Calc Guide Chapter 8 - Using a Pivot Table   (formerly called Data Pilot)
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
boydfritsch
Posts: 3
Joined: Wed Mar 12, 2025 10:40 pm
Location: Napoleon, Ohio

Re: SUMIF not adding based on text from another cell

Post by boydfritsch »

I thought I replied to your last comment, but I don't see it..

I understand your correction. I'll research more on the weekday formula.. Only to learn more.
Thank You So Much for your solution.
OpenOffice - 4.1.15
Windows 10
Locked