+ Reply to Thread
Results 1 to 6 of 6

Number of "y", "n" from report for each employee

  1. #1
    Registered User
    Join Date
    05-16-2017
    Location
    Quebec
    MS-Off Ver
    2010
    Posts
    11

    Question Number of "y", "n" from report for each employee

    Hello people,

    So i am currently working to develop and Audit system for our company, and i am starting out with Excel, and having some trouble with the Pivot table.

    The report i receive include some basic information (see attachement)

    The Pivot i am looking to do, is something like this:


    Employee ..| Total of "Y" | Total of "N" |
    __________|______________|____________|
    Employee 1 | (exemple 10) | (exemple 3) |
    Employee 2 | (exemple 15) | (exemple 6) |
    Employee 3 | (exemple 21) | (exemple 1) |
    _________________ | TOTAL | |TOTAL |

    I would like to be able filter with a Slicer the Employee, then be able to click on the total of N for exemple and get the complete row from the report out of it.

    Could anyone look at the attachement report and help me out a little bit with it, would be much appreciated.
    Attached Files Attached Files

  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,926

    Re: Number of "y", "n" from report for each employee

    The KISS principal is still something that often applies, and I believe this is 1 of those times. Why complicate things with PT's and slicers, when a few relatively simple formulas will (I think) give you wnat you want?

    C
    D
    E
    22
    Employee Y N
    23
    andres.ocampo
    25
    4
    24
    kristopher.brunne
    14
    3
    25
    raphael.gauvin
    11
    2
    26
    joseph.senga
    22
    4
    27
    simon.balti
    40
    5
    28
    janick.bergeron
    13
    2
    29
    enzo.emanuele
    13
    0
    30
    andre.jolin
    22
    4
    31
    patrick.tremblay2
    9
    3
    32
    gabriel.hebert
    14
    2
    33
    gabriel.laprise
    10
    3

    C23=IFERROR(INDEX($C$3:$C$18,MATCH(0,INDEX(COUNTIF($C$22:C22,$C$3:$C$18),),0)),"")
    copied down
    This will generate a unique list of names
    D23=IF(C23="","",SUMPRODUCT(--($C$3:$C$18=$C23)*($I$3:$AG$18=D$22)))
    copied down and across
    This will count the Y and N for each name
    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
    Registered User
    Join Date
    05-16-2017
    Location
    Quebec
    MS-Off Ver
    2010
    Posts
    11

    Re: Number of "y", "n" from report for each employee

    Greeting, this is exactly what i am looking for !

    Only one thing ... not quite sure where to enter this, could i have more precise information if its nothing to much, i googled how to but was not able to phrase correctly i guess.

    Here the sheet and the 'program' i have been working on, also i am open to feedback/modification that could make this whole thing ive been working on for more than a month (was learning in the same time) look better and work better, there is much for me on the line, and i invested a lot of time onto it, its just the pivot thing i cant figure out ... what a shame ! haha
    Attached Files Attached Files
    Last edited by Azerate; 05-17-2017 at 11:07 AM.

  4. #4
    Registered User
    Join Date
    05-16-2017
    Location
    Quebec
    MS-Off Ver
    2010
    Posts
    11

    Re: Number of "y", "n" from report for each employee

    What i dont quite get is the part 'Copied down' & 'Copied down and across'

    This is what i found https://www.pryor.com/blog/copy-exce...fill-a-column/

    But its just not working on my end, seems like its my formatting, not quite sure ...

  5. #5
    Registered User
    Join Date
    05-16-2017
    Location
    Quebec
    MS-Off Ver
    2010
    Posts
    11

    Re: Number of "y", "n" from report for each employee

    I got it to work actually, only one thing, what if i want to put the table on Sheet1 for exemple ?

    Thank alot btw !

  6. #6
    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,926

    Re: Number of "y", "n" from report for each employee

    Sorry for the delay in responding

    I see you got it to work, all you needed to do was enter the formula in a cell where you wanted the answers to show, then just copy/paste it down as far as you needed. Also, I set the formula up so that after you have done the "Y", all you need is copy the formulas across to the next column to get the "N"

    If you get answers that you did not expect, just change the formatting to General (thats what I had to do, seems most of your cells are formatted as Date).

    To put this on another sheet, 1 easy way is to just cut/paste the table to a new sheet, it should adjust the formulas for you.

    Or just add the sheet name into the formula...
    =IFERROR(INDEX($C$3:$C$18,MATCH(0,INDEX(COUNTIF($C$22:C22,$C$3:$C$18),),0)),"")
    becomes
    =IFERROR(INDEX(Database1!$C$3:$C$18,MATCH(0,INDEX(COUNTIF($A$1:A1,Database1!$C$3:$C$18),),0)),"")

    =IF(C23="","",SUMPRODUCT(--($C$3:$C$18=$C23)*($I$3:$AG$18=D$22)))
    becomes
    =IF(A2="","",SUMPRODUCT(--(Database1!$C$3:$C$18=$A2)*(Database1!$I$3:$AG$18=B$1)))

    Let me know if you have any problems?

+ 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. Replies: 5
    Last Post: 02-05-2019, 12:03 AM
  2. [SOLVED] Column X-Ref list - Sheet1 Col A "pages", Col B:FL "Req" to Sheet2 ColA "req", ColB "page"
    By excel-card-pulled in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-07-2017, 09:30 AM
  3. Replies: 4
    Last Post: 11-17-2013, 12:05 PM
  4. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  5. [SOLVED] How to Count number of "Error" and "OK" after the word "Instrument" found in table row
    By eltonlaw in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-17-2012, 06:26 AM
  6. Replies: 5
    Last Post: 10-12-2010, 06:46 AM
  7. Replies: 7
    Last Post: 05-13-2006, 05:02 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