+ Reply to Thread
Results 1 to 7 of 7

Help with combining 2 formulas

  1. #1
    Registered User
    Join Date
    09-28-2017
    Location
    SINGAPORE
    MS-Off Ver
    2016
    Posts
    5

    Exclamation Help with combining 2 formulas

    Hello guys,
    How can I combine this formula
    SUMPRODUCT(COUNTIFS(F3:F4000,{"METCO*";"AMDRY*";"TAFA*";"DURABRADE*";"DIAMALLOY*";"DFL*"},G3:G4000,">="&S4,G3:G4000,"<"&EDATE(S4,1)))

    To this
    =SUMPRODUCT(--(E3:E4000<>""),LEN(E3:E4000)-LEN(SUBSTITUTE(E3:E4000,",",""))+1,(G3:G4000>="01/01/17"+0)*(G3:G4000<="31/01/17"+0))


    Example of what I am trying to do (The table can be found below)
    E F G S T
    3:TS004,005,006 METCO 58NS 03/01/17 Month Count
    4:TS007,008 HARDNESS 20/01/17 January 6
    5:TS009,0010,0011 AMDRY 52 31/01/17

    By combing the formula, I hope that the formula will calculate a comma as 2 and it will calculate only when the criteria METCO,AMDRY,TAFA,DURABRADE and DIAMALLOY is met and also it will only the month of data that I need.




    Thanks in advance
    Last edited by 900867; 09-28-2017 at 08:17 AM. Reason: change

  2. #2
    Registered User
    Join Date
    09-28-2017
    Location
    SINGAPORE
    MS-Off Ver
    2016
    Posts
    5

    Re: Help with combining 2 formulas

    Attachment 540214

    Hi, this is the pic to my table

  3. #3
    Registered User
    Join Date
    09-28-2017
    Location
    SINGAPORE
    MS-Off Ver
    2016
    Posts
    5

    Re: Help with combining 2 formulas

    example.PNG

    This is the picture to my table

  4. #4
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Help with combining 2 formulas

    welcome to the forum. do upload an excel sample so that we do not have to manually key in your data to do a testing. input the desired results so that we don't have to second-guess if what we are doing is correct or not. you may look at my signature to upload an eg that is easier to understand.

    the upload attachment must be done by going to Go Advanced. click on Manage Attachments. Choose file, upload and close the window.

    it seems like this would work for you:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    i used an assumption that you want to find these key words inside column F though. if it needs to begin with these keywords (as you used "METCO*"), this formula would not work.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  5. #5
    Registered User
    Join Date
    09-28-2017
    Location
    SINGAPORE
    MS-Off Ver
    2016
    Posts
    5

    Re: Help with combining 2 formulas

    Hi,
    The formula gives a value of 0 instead of 9.
    9 when the formula counts the E cell with criteria of METCO, TAFA, DFL, AMDRY, and DURABRADE and the month
    i have uploaded a sample as instructed by you.

    thanks for your help in advanced.
    Attached Files Attached Files
    Last edited by 900867; 09-28-2017 at 08:39 AM.

  6. #6
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Help with combining 2 formulas

    you forgot to change the part in red here:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    but anyway, i realized i duplicated that part, so you may remove it. the wildcard (asterisk) has no purpose here too. and i forgot to change the semi-colons to commas. so:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    and here's how you can improve on the sample file to make it easier to understand too:
    do upload an excel sample so that we do not have to manually key in your data to do a testing. input the desired results so that we don't have to second-guess if what we are doing is correct or not. you may look at my signature to upload an eg that is easier to understand.
    desired results: 9?
    if you look at my signature for the url, you also see that you can explain how to get 9. i am guessing:
    count row 1 as 3 counts because there are 3 items in column A, column F contains METCO. column C is within jan 2017.
    count row 3 as 1 count. 1 item in column A, column F contains AMDRY. column C is within jan 2017.
    count row 6 as 2 counts because there are 2 items in column A, column F contains AMDRY. column C is within jan 2017.
    count row 7 as 1 count. 1 item in column A, column F contains TAFA. column C is within jan 2017.
    count row 8 as 2 counts because there are 2 items in column A, column F contains DURABRADE. column C is within jan 2017.
    total of 3 + 1 + 2 + 1 + 2

    if that answers your question, do mark your thread as "Solved"

  7. #7
    Registered User
    Join Date
    09-28-2017
    Location
    SINGAPORE
    MS-Off Ver
    2016
    Posts
    5

    Re: Help with combining 2 formulas

    Hi, Thanks for the help, it works!

+ 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. [SOLVED] combining formulas within VBA
    By Sc0tt1e in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-22-2017, 07:47 AM
  2. Combining formulas
    By jawebb in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-28-2016, 04:57 AM
  3. Combining formulas
    By wjk221 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-19-2014, 01:17 PM
  4. Combining formulas
    By Cmorgan in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 02-26-2012, 04:01 PM
  5. Help Combining Formulas
    By artiststevens in forum Excel General
    Replies: 2
    Last Post: 02-24-2012, 03:15 AM
  6. Combining IF and AND formulas
    By regularguy in forum Excel General
    Replies: 3
    Last Post: 09-14-2010, 07:21 PM
  7. combining two formulas
    By edwardpestian in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-15-2006, 09:36 PM

Tags for this Thread

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