+ Reply to Thread
Results 1 to 8 of 8

Formula to Sum range of numbers if dates and text are matched

  1. #1
    Forum Contributor
    Join Date
    07-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    257

    Formula to Sum range of numbers if dates and text are matched

    Formula to Sum Z4:Z400 but only if D4:D400 are matched with those dates: 06/27/2020 to 07/28/2020 and if F4:F400 are matched with specific text "Pen" .

    D4: 06/28/2020 F4: Pen Z4: 1000
    D5: 06/28/2020 F5: Pencil Z5: 500
    D6: 06/30/2020 F6: Pencil Z6: 12
    D7: 07/01/2020 F7: Pen Z7: 14
    D8: 04/01/2020 F8: Pen Z8: 400
    D09: 04/01/2020 F9: Pen Z9: 99
    D10: 05/01/2020 F10: Pen Z10: 54
    D11: 07/02/2020 F11: Pen Z11: 12
    D12: 07/03/2020 F12: Pencil Z12: 987
    D13: 01/01/2020 F13: Pen Z13: 55
    D14: 01/01/2020 F14: Pen Z14: 12
    D15: 07/15/2020 F15: Pen Z15: 10
    D16: 07/25/2020 F16: Pen Z16: 1


    Result: Z4+Z7+Z11+Z15+Z16=1037
    Last edited by Mr.Castle; 07-26-2020 at 01:16 AM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Formula to Sum range of numbers if dates and text are matched

    Take a look at using SUMIFs() for this
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    07-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    257

    Re: Formula to Sum range of numbers if dates and text are matched

    Hi , This is the only formula i could come up with, =SUMIFS($Z$4:$Z$400,$Z$4:$Z$400,”>=06/27/2020″,$C$3:$C$10,”<=07/28/2020″) but it does not match cells F4:F400 with "pen".

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,448

    Re: Formula to Sum range of numbers if dates and text are matched

    Try this:

    =SUMIFS($Z$4:$Z$400,$D$4:$D$400,">=06/27/2020",$D$4:$D$400,"<=07/28/2020",$F$4:$F$400,"PEN")
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Forum Contributor
    Join Date
    07-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    257

    Re: Formula to Sum range of numbers if dates and text are matched

    Hi, your formula worked quite well , Thank you

    I was wondering if its possible to add a third condition, E4:E400 must match text "green"?

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,448

    Re: Formula to Sum range of numbers if dates and text are matched

    Did you try this?

    =SUMIFS($Z$4:$Z$400,$D$4:$D$400,">=06/27/2020",$D$4:$D$400,"<=07/28/2020",$F$4:$F$400,"Pen",$E$4:$E$400,"Green")

  7. #7
    Forum Contributor
    Join Date
    07-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    257

    Re: Formula to Sum range of numbers if dates and text are matched

    It worked, Thank you

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,448

    Re: Formula to Sum range of numbers if dates and text are matched

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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. Formula to skip empty cells, numbers and text (only dates)
    By Ivancovish in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-29-2019, 09:34 AM
  2. Replies: 4
    Last Post: 08-20-2019, 11:14 PM
  3. [SOLVED] Lookup formula to separate dates/numbers out of a text string
    By kdestef1 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 08-20-2018, 03:38 PM
  4. Find Text in Range of Cells and Sum All Quantities for Matched Cell
    By NardoBro in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-15-2017, 04:35 PM
  5. Formula to return text when column has dates in a specific range
    By Catsonheat in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 11-13-2016, 04:19 PM
  6. [SOLVED] Search Group of Numbers in Cel Rangel and Highligh matched numbers.
    By david gonzalez in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-24-2013, 01:07 AM
  7. Replies: 9
    Last Post: 03-26-2012, 02:16 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