+ Reply to Thread
Results 1 to 7 of 7

COUNTIF and Nested SUMIF question HELP

  1. #1
    Registered User
    Join Date
    02-07-2012
    Location
    Ft Lauderdale
    MS-Off Ver
    Excel 2003
    Posts
    3

    COUNTIF and Nested SUMIF question HELP

    Hi all

    I am new to this forum. I am having a complex problem with a large spreadsheet that manages several items on my job-sites.

    1) It includes a budget the feeds to drop down boxes on each daily page
    2) Equipment list that feed to drop down boxes on Monday tab.
    3) All other days feed off of Monday for their function (would like to in the future make them independent but probably really need to use a database for this if it gets more complicated)
    3) Actually it does a lot of other stuff to complicated to explain. We are using it right now to manage a few mechanics work at our yard so the data that is in here is not typically how it is used but for the purpose of figuring out this formula the data should be sufficient

    The problem I am having is that on the Monday tab, column F, I am trying to use a formula to look at the equipment asset numbers in column E and determine if there is more than one instance of that piece of equipment. If so I would like to return an "*" in column F for the first instance of that equipment number only. In the Equipment Summary tab it looks at the asterisk and sums the hours for all instances of that piece of equipment and puts it on one line of the equipment time sheet.

    This works well if I manually add or delete the "*" for pieces of equipment but I am trying to automate this.

    So if I have all different pieces of equipment (no Duplicates) then all cells in column F have an asterisk. If I list one of those pieces again then I clear the cell in Column F or the *, this triggers the SUMIF formula in the Equipment Summary sheet to add the hours of the two instances of that piece of equipment and only reports the time on one column.

    This spreadsheet is either a work of art or mass stupidity but I had fun getting it to this point

    Can some one guide me in the right direction?
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: COUNTIF and Nested SUMIF question HELP

    Hi, not sure to have understood

    This produces an "*" only at the level of first occurrence in the column of the code (excluding zeros)

    in F8 and down



    Please Login or Register  to view this content.

    There are for sure better solutions

    Regards
    Last edited by canapone; 02-07-2012 at 03:38 PM.
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  3. #3
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: COUNTIF and Nested SUMIF question HELP

    Hi Speedring,

    Welcome to the forum.

    You can use following formula to have * for first occurrence of duplicate values

    Please Login or Register  to view this content.
    Sample file is also attached for better understanding.

    regards,
    DILIPandey

    <click on below 'star' if this helps>
    Attached Files Attached Files
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: COUNTIF and Nested SUMIF question HELP

    In the Equipment Summary sheet, C8 enter:

    =LOOKUP(REPT("z",255),CHOOSE({1,2},"",INDEX(Mon!$E$8:$E$44,SMALL(IF(Mon!$F$8:$F$44="*",ROW(Mon!$E$8:$E$44)-ROW(Mon!$E$8)+1),ROWS($C$8:$C8)))))

    confirmed with CTRL+SHIFT+ENTER not just ENTER and copy down.

    Then in B8:

    =IF(C8="","",INDEX(Equipment!$B$1:$B$50,MATCH(C8,Equipment!$C$1:$C$50,0)))

    confirmed with just ENTER as normal and copy down.

    In the TimeSheet, B7:

    =LOOKUP(REPT("z",255),CHOOSE({1,2},"",INDEX(Mon!$B$8:$B$44,SMALL(IF(Mon!$C$8:$C$44="*",ROW(Mon!$B$8:$B$44)-ROW(Mon!$B$8)+1),ROWS($B$7:$B7)))))

    confirmed with CTRL+SHIFT+ENTER not just ENTER and copy down.

    Note: In F8 of the Mon sheet, you should use Absolute Referencing so you can copy formulas down with manual adjustment of range...

    See Attached.
    Attached Files Attached Files
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  5. #5
    Registered User
    Join Date
    02-07-2012
    Location
    Ft Lauderdale
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: COUNTIF and Nested SUMIF question HELP

    Quote Originally Posted by CANAPONE View Post
    Hi, not sure to have understood

    This produces an "*" only at the level of first occurrence in the column of the code (excluding zeros)

    in F8 and down



    Please Login or Register  to view this content.

    There are for sure better solutions

    Regards
    OK what is the code reference mean?

  6. #6
    Registered User
    Join Date
    02-07-2012
    Location
    Ft Lauderdale
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: COUNTIF and Nested SUMIF question HELP

    Thank you for your help, I did not see that code in the attached spreadsheet.

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: COUNTIF and Nested SUMIF question HELP

    I had assumed the problem was in organizing the Equipment Summary and Timesheets Was I wrong?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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