ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Countif year = help needed (https://www.excelbanter.com/excel-worksheet-functions/447097-countif-year-%3D-help-needed.html)

saffron

Countif year = help needed
 
Hello, I am new to this forum and appreciate any assistance. I have looked for answers to my problem but am not finding anything. What I want to do seems simple but I can't seem to figure it out and will probably kick myself once I get the assistance. I have a simple spreadsheet to track install dates. All I want is to count how many times each year is represented. The column is in date format 1/1/2005 the range is G1:G175. The actual dates vary through the current year. Thank you in advance!

Spencer101

1 Attachment(s)
Quote:

Originally Posted by saffron (Post 1605403)
Hello, I am new to this forum and appreciate any assistance. I have looked for answers to my problem but am not finding anything. What I want to do seems simple but I can't seem to figure it out and will probably kick myself once I get the assistance. I have a simple spreadsheet to track install dates. All I want is to count how many times each year is represented. The column is in date format 1/1/2005 the range is G1:G175. The actual dates vary through the current year. Thank you in advance!

Hi,

Have a look at the attached.

I've included a worksheet with an example for Excel 2003 and one for later versions as they use different formulas, although the 2003 version will work in later versions also.

I've added date cells to give a start date (and end date in the case of 2003).
You could hardcode the dates into the formula, but if you ever need to change the year and recalculate it's easier to change one cell than it is to change formulas.

Hope that's of help.
Let me know if I've misunderstood your requirement.

S.

plinius

Countif year = help needed
 
Il 11/09/2012 23:02, saffron ha scritto:
Hello, I am new to this forum and appreciate any assistance. I have
looked for answers to my problem but am not finding anything. What I
want to do seems simple but I can't seem to figure it out and will
probably kick myself once I get the assistance. I have a simple
spreadsheet to track install dates. All I want is to count how many
times each year is represented. The column is in date format 1/1/2005
the range is G1:G175. The actual dates vary through the current year.
Thank you in advance!





Put in H1 year to be tested

In I1:
=SUMPRODUCT(1*(YEAR($G$1:$G$175)=H1))

Hi,
E.

saffron

Thank you Spencer101,

This worked for me, I really appreciate the assistance!!

Quote:

Originally Posted by Spencer101 (Post 1605416)
Hi,

Have a look at the attached.

I've included a worksheet with an example for Excel 2003 and one for later versions as they use different formulas, although the 2003 version will work in later versions also.

I've added date cells to give a start date (and end date in the case of 2003).
You could hardcode the dates into the formula, but if you ever need to change the year and recalculate it's easier to change one cell than it is to change formulas.

Hope that's of help.
Let me know if I've misunderstood your requirement.

S.


saffron

I did tried this as well as it seemed simpler but it returned an error. I had to reference different cells but made the appropriate changes. Thanks anyway!



Quote:

Originally Posted by plinius (Post 1605424)
Il 11/09/2012 23:02, saffron ha scritto:[color=blue][i]


Spencer101

Quote:

Originally Posted by saffron (Post 1605463)
Thank you Spencer101,

This worked for me, I really appreciate the assistance!!

Any time. Glad to help :)


All times are GMT +1. The time now is 07:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com