+ Reply to Thread
Results 1 to 7 of 7

SUMIF condition

  1. #1
    Registered User
    Join Date
    09-15-2015
    Location
    Italy
    MS-Off Ver
    2019
    Posts
    49

    SUMIF condition

    Hi,
    I wish to sum some numbers from the third row according to the start of the first one (I've attached an image).
    The formula I used is not working but i don't understand why:
    For example W1 is a Saturday, so the number in W3 should be added to the summation
    How can I handle this?
    Attached Images Attached Images
    Last edited by gtsolid; 08-28-2020 at 02:13 AM.

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: SUMIF condition

    A sumproduct might work best for this, but your image is not helpful. Please follow the instructions at the top of the post and upload a sample workbook WITH expected results and we can better help you.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: SUMIF condition

    My guess (and that's the best I can do unless you upload an example workbook as detailed in the yellow banner at the top of the page) is that the values in row 1 are formatted to begin with the weekday but are actually numbers/dates. You'd be able to see that in the formula bar. To SUM only Saturday dates, (assuming row 1 is actual dates)
    =SUMPRODUCT((Weekday(B1:AF1,1)=7)*(B2:AF2))
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    09-15-2015
    Location
    Italy
    MS-Off Ver
    2019
    Posts
    49

    Re: SUMIF condition

    Hi,
    the first row is formatted in a way to show the dates in that way, but i can't use it into the SUMPRODUCT.
    I've attached the file.
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: SUMIF condition

    Okay, the first row is not actually dates, it's text. Try this formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    09-15-2015
    Location
    Italy
    MS-Off Ver
    2019
    Posts
    49

    Re: SUMIF condition

    It works! what does it mean the "--" between brackets?

    I have another question on the third row: it's used only as a support on the calculation on AL2.
    Is there any way to avoid this trick?
    My meaning is calculate how much the number in second row is major to 8 and the sum the result for each day (work overtime calculation).
    Maybe
    Please Login or Register  to view this content.
    Last edited by gtsolid; 08-28-2020 at 02:18 AM.

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: SUMIF condition

    The -- changes TRUE/FALSE values into 1/0 values so that the SUMPRODUCT can do its thing. I'll have to give your second question some thought.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to Use SUMIF to only sum with a condition
    By CasinoDavid in forum Excel General
    Replies: 1
    Last Post: 02-08-2020, 09:45 PM
  2. [SOLVED] sumif with condition
    By VegasL in forum Excel General
    Replies: 5
    Last Post: 08-30-2018, 01:28 AM
  3. SUMIF with condition
    By kisboros in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-27-2013, 03:37 PM
  4. How to next condition to do Sumif
    By pph2113 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-15-2013, 02:16 PM
  5. SumIf with more than one condition
    By qwyz in forum Excel General
    Replies: 5
    Last Post: 05-12-2009, 10:02 AM
  6. SUMIF with Condition
    By Isacael in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-06-2009, 07:37 PM
  7. condition: SUMIF
    By jeremy via OfficeKB.com in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 08-12-2005, 09:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1