PC Review


Reply
 
 
Richard
Guest
Posts: n/a
 
      19th Jun 2008
I must be going senile, as I can usually crack these things, but I am having
massive problems counting dates.

In column A I have the date entered as follows:
=TEXT(WORKDAY(A636,1),"dd-mmm-yy")

I need to count every date where the year is equal to the current year.

Please put me out of my misery and I apologise for such a dumb ass question.

Richard
 
Reply With Quote
 
 
 
 
Mike H
Guest
Posts: n/a
 
      19th Jun 2008
Try

=SUMPRODUCT(--(YEAR($A$1:$A$100)=YEAR(TODAY())))

Mike

"Richard" wrote:

> I must be going senile, as I can usually crack these things, but I am having
> massive problems counting dates.
>
> In column A I have the date entered as follows:
> =TEXT(WORKDAY(A636,1),"dd-mmm-yy")
>
> I need to count every date where the year is equal to the current year.
>
> Please put me out of my misery and I apologise for such a dumb ass question.
>
> Richard

 
Reply With Quote
 
Richard
Guest
Posts: n/a
 
      19th Jun 2008
Mike

Thanks for the reply. I found the issue was that I had entered
=sumproduct(--(year(a:a)=year(today()))) with there being a lable (column
header) in cell a2. I kept getting a return of #NUM!

Is there a way around the label issue.

Richard

"Mike H" wrote:

> Try
>
> =SUMPRODUCT(--(YEAR($A$1:$A$100)=YEAR(TODAY())))
>
> Mike
>
> "Richard" wrote:
>
> > I must be going senile, as I can usually crack these things, but I am having
> > massive problems counting dates.
> >
> > In column A I have the date entered as follows:
> > =TEXT(WORKDAY(A636,1),"dd-mmm-yy")
> >
> > I need to count every date where the year is equal to the current year.
> >
> > Please put me out of my misery and I apologise for such a dumb ass question.
> >
> > Richard

 
Reply With Quote
 
Mike H
Guest
Posts: n/a
 
      19th Jun 2008
Hi,

=SUMPRODUCT(--(YEAR(A2:A65536)=YEAR(TODAY())))


Mike

"Richard" wrote:

> Mike
>
> Thanks for the reply. I found the issue was that I had entered
> =sumproduct(--(year(a:a)=year(today()))) with there being a lable (column
> header) in cell a2. I kept getting a return of #NUM!
>
> Is there a way around the label issue.
>
> Richard
>
> "Mike H" wrote:
>
> > Try
> >
> > =SUMPRODUCT(--(YEAR($A$1:$A$100)=YEAR(TODAY())))
> >
> > Mike
> >
> > "Richard" wrote:
> >
> > > I must be going senile, as I can usually crack these things, but I am having
> > > massive problems counting dates.
> > >
> > > In column A I have the date entered as follows:
> > > =TEXT(WORKDAY(A636,1),"dd-mmm-yy")
> > >
> > > I need to count every date where the year is equal to the current year.
> > >
> > > Please put me out of my misery and I apologise for such a dumb ass question.
> > >
> > > Richard

 
Reply With Quote
 
Mike H
Guest
Posts: n/a
 
      19th Jun 2008
I forgot to mention Sumproduct will not accept A:A as a range

"Richard" wrote:

> Mike
>
> Thanks for the reply. I found the issue was that I had entered
> =sumproduct(--(year(a:a)=year(today()))) with there being a lable (column
> header) in cell a2. I kept getting a return of #NUM!
>
> Is there a way around the label issue.
>
> Richard
>
> "Mike H" wrote:
>
> > Try
> >
> > =SUMPRODUCT(--(YEAR($A$1:$A$100)=YEAR(TODAY())))
> >
> > Mike
> >
> > "Richard" wrote:
> >
> > > I must be going senile, as I can usually crack these things, but I am having
> > > massive problems counting dates.
> > >
> > > In column A I have the date entered as follows:
> > > =TEXT(WORKDAY(A636,1),"dd-mmm-yy")
> > >
> > > I need to count every date where the year is equal to the current year.
> > >
> > > Please put me out of my misery and I apologise for such a dumb ass question.
> > >
> > > Richard

 
Reply With Quote
 
Ron Rosenfeld
Guest
Posts: n/a
 
      19th Jun 2008
On Thu, 19 Jun 2008 04:15:02 -0700, Richard <(E-Mail Removed)>
wrote:

>Mike
>
>Thanks for the reply. I found the issue was that I had entered
>=sumproduct(--(year(a:a)=year(today()))) with there being a lable (column
>header) in cell a2. I kept getting a return of #NUM!
>
>Is there a way around the label issue.
>
>Richard


I'm surprised you are getting a #NUM! error and not a #VALUE! error.

Since you have specified an entire column as your argument, I am assuming you
are using Excel 2007. That being the case, you can try this **array** formula:

=SUM(--(IF(ISNUMBER(--A:A),YEAR(A:A))=YEAR(TODAY())))

To enter an array formula, hold down <ctrl><shift> while hitting <enter>. Excel
will place braces {...} around the formula.

If you are not using Excel 2007, then your arguments must not encompass an
entire column. e.g:

=SUM(--(IF(ISNUMBER(--A1:A65535),YEAR(A1:A65535))=YEAR(TODAY())))

--ron
 
Reply With Quote
 
Richard
Guest
Posts: n/a
 
      19th Jun 2008
No, I am not using 2007, I just tried a:a sorry it is lack of sleep.

at least I understand now

thanks for the help

"Ron Rosenfeld" wrote:

> On Thu, 19 Jun 2008 04:15:02 -0700, Richard <(E-Mail Removed)>
> wrote:
>
> >Mike
> >
> >Thanks for the reply. I found the issue was that I had entered
> >=sumproduct(--(year(a:a)=year(today()))) with there being a lable (column
> >header) in cell a2. I kept getting a return of #NUM!
> >
> >Is there a way around the label issue.
> >
> >Richard

>
> I'm surprised you are getting a #NUM! error and not a #VALUE! error.
>
> Since you have specified an entire column as your argument, I am assuming you
> are using Excel 2007. That being the case, you can try this **array** formula:
>
> =SUM(--(IF(ISNUMBER(--A:A),YEAR(A:A))=YEAR(TODAY())))
>
> To enter an array formula, hold down <ctrl><shift> while hitting <enter>. Excel
> will place braces {...} around the formula.
>
> If you are not using Excel 2007, then your arguments must not encompass an
> entire column. e.g:
>
> =SUM(--(IF(ISNUMBER(--A1:A65535),YEAR(A1:A65535))=YEAR(TODAY())))
>
> --ron
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count issue continued from "text then date ascending count" Cameron Microsoft Access Queries 8 30th Jul 2009 10:02 PM
count a value in a date range based on a date in another workshee. marsjune68 Microsoft Excel Worksheet Functions 4 9th Apr 2009 10:31 PM
Count number of cells with date <today's date =?Utf-8?B?Q2FjaG9kMQ==?= Microsoft Excel New Users 2 28th Jan 2006 02:37 AM
count the number of cells with a date <= today's date =?Utf-8?B?Q2FjaG9kMQ==?= Microsoft Excel New Users 3 27th Jan 2006 09:14 PM
Need count, PatientID by Admit Date by Visit Date =?Utf-8?B?VmFuY2U=?= Microsoft Access Macros 1 17th Oct 2004 10:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:15 AM.