+ Reply to Thread
Results 1 to 8 of 8

Formula needed to count if data is specific to a year

  1. #1
    Forum Contributor
    Join Date
    02-24-2013
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2013
    Posts
    113

    Formula needed to count if data is specific to a year

    Hi all, I am working on a spread sheet which you guys have already helped me with. I now want to count the number of days employees have spent training in a particular year.

    I have attached an example for you. The course duration is in column 4 just under the cell Éxpiry". If the training courses were Completed in 2013 I want to add the course durations for each employee.

    I hope this makes sense.

    Thanks

    Katie
    Attached Files Attached Files

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Formula needed to count if data is specific to a year

    In F5, try this array formula

    =SUMPRODUCT(--(IFERROR(YEAR(G5:N5),0)=2013),$H$4:$O$4)

    Confirm with Ctrl+Shift+Enter and not just Enter

    Copy down
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Contributor
    Join Date
    02-24-2013
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2013
    Posts
    113

    Re: Formula needed to count if data is specific to a year

    Thank you, this works for these columns but when I amend it slightly to go across all the other columns it is sending back #VALUE

    I have attached the full example
    Attached Files Attached Files

  4. #4
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Formula needed to count if data is specific to a year

    In F5 use

    =SUMPRODUCT(--(IFERROR(YEAR($G5:$BL5),0)=2013),$H$4:$BM$4)

    copy down

    Remember to Ctrl+Shift+Enter

  5. #5
    Forum Contributor
    Join Date
    02-24-2013
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2013
    Posts
    113

    Re: Formula needed to count if data is specific to a year

    I have a quick question though. People on here have given me a few formulas now that you need to press Ctrl+Shift+Enter, why is this?

  6. #6
    Forum Contributor
    Join Date
    02-24-2013
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2013
    Posts
    113

    Re: Formula needed to count if data is specific to a year

    But other than that question the formula works perfectly. Thank you so much

  7. #7
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Formula needed to count if data is specific to a year

    Cntrl+Shift+Enter makes the formula an Araay Formula, meaning that it looks at arrays of numbers to do its calculations..which gives the correct response for formulas dealing with multiple entries/conditions (this is a very simplified explanation)
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  8. #8
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Formula needed to count if data is specific to a year

    Some more reading on array formulas

    http://www.cpearson.com/excel/arrayformulas.aspx

+ 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