Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default sumproduct or countif

hi,
i am trying to count the number of times a date repeats. eg:
4/1/07
4/1/07
4/2/07
4/2/07
4/3/07
..
..
..
4/30/07
4/30/07
ect...
for the whole month
data corralates with number of visits per day.

i have created a helper colum B with number 1-31, and used the following
=SUMPRODUCT(--$A$2:$A$1000=$B2),--($A$2:$A$1000<$B$3))
where A is data, B is helper
returns 0 in all. formated to gen number. have tried several diff formats.

have also tried
=COUNT(A2:A1000)-SUMPRODUCT((B2:B2000<")/COUNTIF(B2:B1000,B2:B1000+(B2:B1000="")))

have also tried
=SUMIF(A1:A1000,"<"&DATE(4/1/07),B1:B31-SUMIF(A1:A1000,+<"&DATE(4,1,07),B1:B31)
It initially returned 0 then next time thru returned N/A


i have tried xldynamic.com
i'm sure there is an easirer way to do this. i'm terrible with formulas, but
i'm chugging at it and i think i'm over my head...
thanks in advance
--
dr350x
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default sumproduct or countif

Consider using a Pivot Table. It will produce a nice table that lists each
date uniquely and the number of time the date occurs in your table. For
example:

tades
6/16/2007
6/16/2007
6/16/2007
6/16/2007
6/16/2007
6/16/2007
6/16/2007
6/16/2007
6/16/2007
6/15/2007
6/15/2007
6/15/2007
6/15/2007
6/15/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
can produce a table like:


Count of tades
tades Total
6/15/2007 5
6/16/2007 9
6/17/2007 22
(blank)
Grand Total 36


see:

http://peltiertech.com/Excel/Pivots/pivotstart.htm
--
Gary''s Student - gsnu200730


"dr350x" wrote:

hi,
i am trying to count the number of times a date repeats. eg:
4/1/07
4/1/07
4/2/07
4/2/07
4/3/07
.
.
.
4/30/07
4/30/07
ect...
for the whole month
data corralates with number of visits per day.

i have created a helper colum B with number 1-31, and used the following
=SUMPRODUCT(--$A$2:$A$1000=$B2),--($A$2:$A$1000<$B$3))
where A is data, B is helper
returns 0 in all. formated to gen number. have tried several diff formats.

have also tried
=COUNT(A2:A1000)-SUMPRODUCT((B2:B2000<")/COUNTIF(B2:B1000,B2:B1000+(B2:B1000="")))

have also tried
=SUMIF(A1:A1000,"<"&DATE(4/1/07),B1:B31-SUMIF(A1:A1000,+<"&DATE(4,1,07),B1:B31)
It initially returned 0 then next time thru returned N/A


i have tried xldynamic.com
i'm sure there is an easirer way to do this. i'm terrible with formulas, but
i'm chugging at it and i think i'm over my head...
thanks in advance
--
dr350x

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default sumproduct or countif

You will either have to change the 1- 31 numbers in Column B into dates:

4/1/07
4/2/07
4/3/07 etc. and then use:

=COUNTIF($A$1:$A$31,B1)
in C1 and drag down using the fill handle to C31

or with 1 - 31 in Column B use:

=SUM(--(DAY(A1:A24)=B2))
entered as an array formula by pressing and holding Ctr + Shift while you
press Enter. If you do it right then XL will surround the formula with
curly braces:

={SUM(--(DAY($A$1:$A$31)=B1))}

or use:
=SUMPRODUCT(--(DAY($A$1:$A$31)=B1))
normally entered.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


with @tiscali.co.uk


"dr350x" wrote in message
...
hi,
i am trying to count the number of times a date repeats. eg:
4/1/07
4/1/07
4/2/07
4/2/07
4/3/07
.
.
.
4/30/07
4/30/07
ect...
for the whole month
data corralates with number of visits per day.

i have created a helper colum B with number 1-31, and used the following
=SUMPRODUCT(--$A$2:$A$1000=$B2),--($A$2:$A$1000<$B$3))
where A is data, B is helper
returns 0 in all. formated to gen number. have tried several diff formats.

have also tried
=COUNT(A2:A1000)-SUMPRODUCT((B2:B2000<")/COUNTIF(B2:B1000,B2:B1000+(B2:B1000="")))

have also tried
=SUMIF(A1:A1000,"<"&DATE(4/1/07),B1:B31-SUMIF(A1:A1000,+<"&DATE(4,1,07),B1:B31)
It initially returned 0 then next time thru returned N/A


i have tried xldynamic.com
i'm sure there is an easirer way to do this. i'm terrible with formulas,
but
i'm chugging at it and i think i'm over my head...
thanks in advance
--
dr350x



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default sumproduct or countif

thanks g 's
-- will give it a try.

dr350x


"Gary''s Student" wrote:

Consider using a Pivot Table. It will produce a nice table that lists each
date uniquely and the number of time the date occurs in your table. For
example:

tades
6/16/2007
6/16/2007
6/16/2007
6/16/2007
6/16/2007
6/16/2007
6/16/2007
6/16/2007
6/16/2007
6/15/2007
6/15/2007
6/15/2007
6/15/2007
6/15/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
6/17/2007
can produce a table like:


Count of tades
tades Total
6/15/2007 5
6/16/2007 9
6/17/2007 22
(blank)
Grand Total 36


see:

http://peltiertech.com/Excel/Pivots/pivotstart.htm
--
Gary''s Student - gsnu200730


"dr350x" wrote:

hi,
i am trying to count the number of times a date repeats. eg:
4/1/07
4/1/07
4/2/07
4/2/07
4/3/07
.
.
.
4/30/07
4/30/07
ect...
for the whole month
data corralates with number of visits per day.

i have created a helper colum B with number 1-31, and used the following
=SUMPRODUCT(--$A$2:$A$1000=$B2),--($A$2:$A$1000<$B$3))
where A is data, B is helper
returns 0 in all. formated to gen number. have tried several diff formats.

have also tried
=COUNT(A2:A1000)-SUMPRODUCT((B2:B2000<")/COUNTIF(B2:B1000,B2:B1000+(B2:B1000="")))

have also tried
=SUMIF(A1:A1000,"<"&DATE(4/1/07),B1:B31-SUMIF(A1:A1000,+<"&DATE(4,1,07),B1:B31)
It initially returned 0 then next time thru returned N/A


i have tried xldynamic.com
i'm sure there is an easirer way to do this. i'm terrible with formulas, but
i'm chugging at it and i think i'm over my head...
thanks in advance
--
dr350x

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default sumproduct or countif

ausome, both worked great!!
thanks to both for the help
--
dr350x


"Sandy Mann" wrote:

You will either have to change the 1- 31 numbers in Column B into dates:

4/1/07
4/2/07
4/3/07 etc. and then use:

=COUNTIF($A$1:$A$31,B1)
in C1 and drag down using the fill handle to C31

or with 1 - 31 in Column B use:

=SUM(--(DAY(A1:A24)=B2))
entered as an array formula by pressing and holding Ctr + Shift while you
press Enter. If you do it right then XL will surround the formula with
curly braces:

={SUM(--(DAY($A$1:$A$31)=B1))}

or use:
=SUMPRODUCT(--(DAY($A$1:$A$31)=B1))
normally entered.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


with @tiscali.co.uk


"dr350x" wrote in message
...
hi,
i am trying to count the number of times a date repeats. eg:
4/1/07
4/1/07
4/2/07
4/2/07
4/3/07
.
.
.
4/30/07
4/30/07
ect...
for the whole month
data corralates with number of visits per day.

i have created a helper colum B with number 1-31, and used the following
=SUMPRODUCT(--$A$2:$A$1000=$B2),--($A$2:$A$1000<$B$3))
where A is data, B is helper
returns 0 in all. formated to gen number. have tried several diff formats.

have also tried
=COUNT(A2:A1000)-SUMPRODUCT((B2:B2000<")/COUNTIF(B2:B1000,B2:B1000+(B2:B1000="")))

have also tried
=SUMIF(A1:A1000,"<"&DATE(4/1/07),B1:B31-SUMIF(A1:A1000,+<"&DATE(4,1,07),B1:B31)
It initially returned 0 then next time thru returned N/A


i have tried xldynamic.com
i'm sure there is an easirer way to do this. i'm terrible with formulas,
but
i'm chugging at it and i think i'm over my head...
thanks in advance
--
dr350x






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default sumproduct or countif

You're very welcome. Thanks for the feedback

--
Regards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


with @tiscali.co.uk


"dr350x" wrote in message
...
ausome, both worked great!!
thanks to both for the help
--
dr350x


"Sandy Mann" wrote:

You will either have to change the 1- 31 numbers in Column B into dates:

4/1/07
4/2/07
4/3/07 etc. and then use:

=COUNTIF($A$1:$A$31,B1)
in C1 and drag down using the fill handle to C31

or with 1 - 31 in Column B use:

=SUM(--(DAY(A1:A24)=B2))
entered as an array formula by pressing and holding Ctr + Shift while you
press Enter. If you do it right then XL will surround the formula with
curly braces:

={SUM(--(DAY($A$1:$A$31)=B1))}

or use:
=SUMPRODUCT(--(DAY($A$1:$A$31)=B1))
normally entered.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


with @tiscali.co.uk


"dr350x" wrote in message
...
hi,
i am trying to count the number of times a date repeats. eg:
4/1/07
4/1/07
4/2/07
4/2/07
4/3/07
.
.
.
4/30/07
4/30/07
ect...
for the whole month
data corralates with number of visits per day.

i have created a helper colum B with number 1-31, and used the
following
=SUMPRODUCT(--$A$2:$A$1000=$B2),--($A$2:$A$1000<$B$3))
where A is data, B is helper
returns 0 in all. formated to gen number. have tried several diff
formats.

have also tried
=COUNT(A2:A1000)-SUMPRODUCT((B2:B2000<")/COUNTIF(B2:B1000,B2:B1000+(B2:B1000="")))

have also tried
=SUMIF(A1:A1000,"<"&DATE(4/1/07),B1:B31-SUMIF(A1:A1000,+<"&DATE(4,1,07),B1:B31)
It initially returned 0 then next time thru returned N/A


i have tried xldynamic.com
i'm sure there is an easirer way to do this. i'm terrible with
formulas,
but
i'm chugging at it and i think i'm over my head...
thanks in advance
--
dr350x







  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default sumproduct or countif

I'd also put the real dates in the helper column, but you could use this, too:

=countif($a$2:$a$1000,date(2007,4,b2))





dr350x wrote:

hi,
i am trying to count the number of times a date repeats. eg:
4/1/07
4/1/07
4/2/07
4/2/07
4/3/07
.
.
.
4/30/07
4/30/07
ect...
for the whole month
data corralates with number of visits per day.

i have created a helper colum B with number 1-31, and used the following
=SUMPRODUCT(--$A$2:$A$1000=$B2),--($A$2:$A$1000<$B$3))
where A is data, B is helper
returns 0 in all. formated to gen number. have tried several diff formats.

have also tried
=COUNT(A2:A1000)-SUMPRODUCT((B2:B2000<")/COUNTIF(B2:B1000,B2:B1000+(B2:B1000="")))

have also tried
=SUMIF(A1:A1000,"<"&DATE(4/1/07),B1:B31-SUMIF(A1:A1000,+<"&DATE(4,1,07),B1:B31)
It initially returned 0 then next time thru returned N/A

i have tried xldynamic.com
i'm sure there is an easirer way to do this. i'm terrible with formulas, but
i'm chugging at it and i think i'm over my head...
thanks in advance
--
dr350x


--

Dave Peterson
  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 806
Default sumproduct or countif

Hello,

Another approach:

http://www.sulprobil.com/html/listfreq.html

Regards,
Bernd

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sumproduct and Countif together [email protected] Excel Discussion (Misc queries) 3 April 2nd 07 05:00 PM
Sumproduct and Countif [email protected] Excel Discussion (Misc queries) 0 April 2nd 07 02:51 PM
sumproduct vs. countif Coal Miner Excel Discussion (Misc queries) 1 June 15th 06 09:34 PM
Countif or Sumproduct Harley Excel Discussion (Misc queries) 8 December 22nd 05 12:34 AM
SumProduct or CountIf Kim Excel Worksheet Functions 7 July 9th 05 12:04 AM


All times are GMT +1. The time now is 04:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"