+ Reply to Thread
Results 1 to 4 of 4

SUM funtion for cells in row containing both string AND with specified month

  1. #1
    Registered User
    Join Date
    02-15-2019
    Location
    Moscow, Russia
    MS-Off Ver
    2007
    Posts
    2

    SUM funtion for cells in row containing both string AND with specified month

    First of all, Greetings!

    To try and explain simply as possible i'm trying to accomplish this :

    SUM C2:C38 IF B2:B38 = groceries AND IF DATE in A2:A38 is between 1/1/2019-1/31/2019 (any day in the month of january)


    Per row, Column A is date, Column B is for what was bought, Column C is how much.

    So IF on row 1, $10 was spent ,during January, I would like to add that $10 to the total in a specific cell.



    Currently I am just specifically naming the cell ranges that are in January like so:

    =SUMIF(B2:B8,"groceries",C2:C8)


    After a bunch of googling tried this :

    =SUMIFS(C2:C38,B2:B38,"groceries",a2:a38,”>=01-Jan-2017″,A2:A38,”<=31-Jan-2019″)


    Didn't work.



    Any help is greatly appreciated, sorry if this was answered already but I just haven't been able to find this answer on my own.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,794

    Re: SUM funtion for cells in row containing both string AND with specified month

    What does "Didn't work" mean? Do you get an error message, or a value of zero, or some other value?

    Perhaps your dates are not proper dates, but are text values which look like a date.

    Maybe the values in column C are text values, rather than real numbers.

    It would help if you attached a sample Excel workbook.

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and then on Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post. Don't try to use the Paperclip icon, as this doesn't work on this forum.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    02-15-2019
    Location
    Moscow, Russia
    MS-Off Ver
    2007
    Posts
    2

    Re: SUM funtion for cells in row containing both string AND with specified month

    Hey Pete, Thanks for the reply.

    There was a formula parse error.

    I have column A formatted to MM/DD/YYYY, column B Plain Text, and column C to local currency.

    I tried changing

    =SUMIFS(C2:C38,B2:B38,"groceries",a2:a38,”>=01-Jan-2017″,A2:A38,”<=31-Jan-2019″)

    to

    =SUMIFS(C2:C38,B2:B38,"groceries",a2:a38,”>=1/1/2019″,A2:A38,”<=1/31/2019″)

    (also tried without the quotes)

    with no luck.

    I've attached the sheet to this reply.



    Thanks,
    Steve.
    Attached Files Attached Files

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,407

    Re: SUM funtion for cells in row containing both string AND with specified month

    Edited: corrected mistake in last formula.

    In the attached I removed the month names and ":" so they will match Descriptions. The first of the month (and it can be any day in the target month) is in column E. Then this formula in G1 filled down to G2
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    In G3
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Copy G1:G3 and paste into G8.
    Last edited by FlameRetired; 02-15-2019 at 06:54 PM.
    Dave

+ 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 lock or freeze today funtion and Now funtion
    By edwest01 in forum Excel General
    Replies: 2
    Last Post: 12-09-2018, 06:35 PM
  2. Replies: 4
    Last Post: 10-29-2015, 08:21 AM
  3. Use the subtotal funtion to sum a range of cells based on a criteria.
    By TimPD in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-15-2014, 07:46 AM
  4. Conditional format: mark cells with 1 text string & exclude cells with another string
    By KArnoldColumbia in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-15-2013, 01:43 AM
  5. need background funtion for 2 cells to work
    By firefightnlife in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-07-2012, 08:06 PM
  6. avoid explicitly blanked cells in CountA funtion?
    By all4excel in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-29-2008, 12:34 PM
  7. Cell Funtion related to Adjacent cells
    By anjanesh in forum Excel General
    Replies: 6
    Last Post: 06-26-2006, 08:50 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