+ Reply to Thread
Results 1 to 6 of 6

Count occurances of date across multiple columns & display # of occurances for each column

  1. #1
    Registered User
    Join Date
    05-08-2012
    Location
    Florida, USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Count occurances of date across multiple columns & display # of occurances for each column

    I have spreadsheets made for different projects and each project is split up into columns that indicate when each step of that project is completed. When a step is completed I mark the date of completion. The projects can be repeated for many clients at once therefore, the number of times each step is completed (i.e. 5 step ones completed) becomes summed using the count feature and then multiplied by a price for that step. This allows me to know how much money I'm making from each step.

    I created an additional worksheet (fiscal year 2012) that needs to be able to count each step completed of each project and display the amount earned for a particular month for a particular step. For example, "how much did I earn total for step 1 for the month of January 2012". Then determine "how much I earned for step 2 for the month of January 2012". This would repeat for all months and all steps of each project. My goal is to breakdown my revenue by month to forecast future earnings.

    So, I want to create one "master" financial spreadsheet that will pull the data from all my other project spreadsheets. I do not plan on renaming or moving the files so my master will not loose the reference.

    I have found a way to do this, but the function coding will be very long. I used a sumproduct array:
    =(SUMPRODUCT(--('1-1-11 to 4-30-12'!$F$9:$F$25>=DATE(2011,7,1)+0),--('1-1-11 to 4-30-12'!$F$9:$F$25<=DATE(2011,7,31)+0))*'1-1-11 to 4-30-12'!$F$8)

    This allowed me to search only for the month of July dates in a particular column. I would have to repeat this code for every column and for every month. There has to be an easier method.

    Any suggestions and help is greatly appreciated. Thank you in advance!

    I have attached an example of a project worksheet.
    Attached Files Attached Files
    Last edited by masi10; 05-08-2012 at 10:25 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    02-09-2006
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    1,075

    Re: Count occurances of date across multiple columns & display # of occurances for each co

    I use this method in lots of reports but I refer to the date in the column heading instead of hard coding in the formula - see attached.
    Attached Files Attached Files
    Trish in Oz
    -------------
    A problem well defined is a puzzle half solved


    If you attach a sample of your workbook it will be easier to find a solution. Remember to remove/replace sensitive data before uploading the file. Look here if you need help with attachments:
    http://www.excelforum.com/faq.php?fa...b3_attachments

  3. #3
    Registered User
    Join Date
    05-08-2012
    Location
    Florida, USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Count occurances of date across multiple columns & display # of occurances for each co

    Quote Originally Posted by tuph View Post
    I use this method in lots of reports but I refer to the date in the column heading instead of hard coding in the formula - see attached.
    Tuph,
    Thank you for the quick reply. Is there a quicker/easier way to code the columns quickly from the reference worksheet? I have other projects that I'll be collecting data from that have a lot more columns that need to go onto the fiscal year worksheet.
    Thanks!

  4. #4
    Valued Forum Contributor
    Join Date
    02-09-2006
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    1,075

    Re: Count occurances of date across multiple columns & display # of occurances for each co

    You can use the fill handle to replicate your formula to the right and down. This will adjust any cell references which don't have a $ sign in front - e.g., C$4 will change to D$4, E$4, etc as you drag to the right.

    If your new data is in separate worksheets you can select the appropriate rows in the summary worksheet and replace 1-1-11 to 4-30-12 with the new tab name. Be sure to retain the single quotes around the tab name - 'New Tab Name' - or the formulas won't work. This replacement method assumes that all of the worksheets have the data in the same columns and rows.

    I don't know of an easier way of doing this unless you get into VB.

  5. #5
    Registered User
    Join Date
    05-08-2012
    Location
    Florida, USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Count occurances of date across multiple columns & display # of occurances for each co

    Quote Originally Posted by tuph View Post
    You can use the fill handle to replicate your formula to the right and down. This will adjust any cell references which don't have a $ sign in front - e.g., C$4 will change to D$4, E$4, etc as you drag to the right.

    If your new data is in separate worksheets you can select the appropriate rows in the summary worksheet and replace 1-1-11 to 4-30-12 with the new tab name. Be sure to retain the single quotes around the tab name - 'New Tab Name' - or the formulas won't work. This replacement method assumes that all of the worksheets have the data in the same columns and rows.

    I don't know of an easier way of doing this unless you get into VB.

    This has been working well, I thought, until I went back to check on the results. For some reason the calculations are not correct for certain time periods. For example, Quarter 3 and Quarter 4 of fiscal year 2014 is not returning the correct values but quarter 1 and quarter 2 are returning the correct values. This is the same for fiscal year 2015. The problem does not occur in fiscal year 2012 or 2013. I have checked the formatting of each cell and also rewrote the function numerous times with no success. I have hand counted each event by date and the amounts are short when using the sumproduct function. I believe the problem lies in columns P and Q.

    I have attached the spreadsheet and the worksheet "Opera Projection" is where the problem is at.

    Any help would be appreciated!
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Count occurances of date across multiple columns & display # of occurances for each co

    Pl see the attached file.
    I have used "Opera Projection(2)" Sheet.Original Sheet not altered.

    I have used Spare cells range AE10:AT26 (With formula ) to simplify the long formulas given by you.

    The required formulas are available in AE34 to AH39.
    You can drag each Formula Downwords only.

    I feel this is what you require.

    With Regards ,
    kvsrinivasamurthy
    Attached Files Attached Files
    Last edited by kvsrinivasamurthy; 05-11-2012 at 04:46 AM.

+ 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