+ Reply to Thread
Results 1 to 8 of 8

Help Needed in Complex SumIF function

  1. #1
    Registered User
    Join Date
    08-04-2015
    Location
    Malaysia
    MS-Off Ver
    Microsoft Office 365
    Posts
    57

    Help Needed in Complex SumIF function

    Sample.png

    I have a data sheet as per enclosed photographs.
    In the data:

    Column E = Unit No.
    Column X = Unit Sign Off Date

    I would like to find a formula to calculate "Total Units Sign Off" with the following condition:

    1) There must have a unit sign off date enter at Column X;
    2) If multiple entries for the same unit at Column E, all respective entry row must have a unit sign off date at Column X;

    For example:
    E3 cell is unit A-03-1, X3 cell is empty
    E4 cell is unit A-03-1, X4 cell is empty
    E5 cell is unit A-03-1, X5 cell dated 9/8/2017

    So in this case, Unit A-03-1 will not be count due to have two entries (E3 & E4) without date at Column X.

    Another example:
    E11 & E12 cell is unit A-03-5 and both also have date (21/7/17) at X11 & X12 cell. So unit A-03-5 will count as 1.

    Based on the sample table provided, the result should be return as 3. Counted units will be A-03-5 (E11 & E12, X11 & X12), A-03-6 (E13 & X13), and A-03-8 (E15 & X15).

    Please Help on write to formula for that effect.
    Thank you.
    Attached Files Attached Files
    Last edited by ulala2; 04-02-2018 at 02:21 AM.

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Help Needed in Complex SumIF function

    may be like this
    =COUNTIFS(E3:E21,"A-03-1",X3:X21,"<>")
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Registered User
    Join Date
    08-04-2015
    Location
    Malaysia
    MS-Off Ver
    Microsoft Office 365
    Posts
    57

    Re: Help Needed in Complex SumIF function

    Quote Originally Posted by nflsales View Post
    may be like this
    =COUNTIFS(E3:E21,"A-03-1",X3:X21,"<>")
    Thanks for the prompt reply.
    However this only will count anything related to unit A-03-1.
    MY actual date have 4000 rows, this formula unable to count all the entry for all units.

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Help Needed in Complex SumIF function

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,197

    Re: Help Needed in Complex SumIF function

    With helper in AC3

    =IF(E3=E2,"",IF(COUNTIFS($E$3:$E$21,$E3)=COUNTIFS($E$3:$E$21,$E3,$X$3:$X$21,"<>"),1,""))

    Copy down

    SUM column to give result.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    08-04-2015
    Location
    Malaysia
    MS-Off Ver
    Microsoft Office 365
    Posts
    57

    Re: Help Needed in Complex SumIF function

    Quote Originally Posted by JohnTopley View Post
    With helper in AC3

    =IF(E3=E2,"",IF(COUNTIFS($E$3:$E$21,$E3)=COUNTIFS($E$3:$E$21,$E3,$X$3:$X$21,"<>"),1,""))

    Copy down

    SUM column to give result.
    Dear JohnTopley,

    Thanks for the help, with helper column, it works.

    However, appreciate your further explanation on the provided formula.

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,197

    Re: Help Needed in Complex SumIF function

    =IF(E3=E2,"",IF(COUNTIFS($E$3:$E$21,$E3)=COUNTIFS($E$3:$E$21,$E3,$X$3:$X$21,"<>"),1,""))


    =IF(E3=E2,"" simply checks if it is the first entry for a Unit Number: if YES i.e E3<>E2 it will ouput the result of the next part of the formula


    COUNTIFS($E$3:$E$21,$E3) counts the number of occurrences of a given Unit Number


    COUNTIFS($E$3:$E$21,$E3,$X$3:$X$21,"<>") counts the number of Unit numbers with "Sign-offs"

    IF both counts are equal i.e. all Units signed off, then result is !: otherwise blank.

  8. #8
    Registered User
    Join Date
    08-04-2015
    Location
    Malaysia
    MS-Off Ver
    Microsoft Office 365
    Posts
    57

    Re: Help Needed in Complex SumIF function

    Quote Originally Posted by JohnTopley View Post
    =IF(E3=E2,"",IF(COUNTIFS($E$3:$E$21,$E3)=COUNTIFS($E$3:$E$21,$E3,$X$3:$X$21,"<>"),1,""))


    =IF(E3=E2,"" simply checks if it is the first entry for a Unit Number: if YES i.e E3<>E2 it will ouput the result of the next part of the formula


    COUNTIFS($E$3:$E$21,$E3) counts the number of occurrences of a given Unit Number


    COUNTIFS($E$3:$E$21,$E3,$X$3:$X$21,"<>") counts the number of Unit numbers with "Sign-offs"

    IF both counts are equal i.e. all Units signed off, then result is !: otherwise blank.
    Thanks for the detail explanation

+ 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. complex SUMIF function...
    By allheilyb1 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-07-2017, 05:30 PM
  2. [SOLVED] Complex Index/Match Function Needed
    By blens1 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-25-2015, 12:42 AM
  3. [SOLVED] Foruma needed to integrate indirect and sumif function
    By VincentNL in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-01-2014, 10:45 AM
  4. Complex IF function is needed for the following, however gives !#VALUE
    By Dimuthu93 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-11-2010, 02:58 AM
  5. Complex lookup extract and concate function needed
    By Weezy in forum Excel General
    Replies: 5
    Last Post: 04-09-2010, 11:42 AM
  6. SUMIF function help needed Got first now have second question
    By mikeydaman in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-05-2008, 09:39 PM
  7. somewhat complex function needed
    By BKolb in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-02-2008, 10:31 AM

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