PC Review


Reply
Thread Tools Rate Thread

Count cells every 12th column?

 
 
tours@aldoleopold.org
Guest
Posts: n/a
 
      2nd Jul 2008
Hello,

I am trying to come up with a formula that will help in calculating
averages in my visitor tracking spreadsheet. My spreadsheet has a lot
of visitor demographics and head count data entered by day. Across the
top, I have dates as column labels. Down the side, I have different
visitor demographic age ranges as row labels. On the lowest row, I
have a total of all the visitors in any given day.

I've already figured out the formula to count the different age groups
and genders. Now what I need is a formula to count the total visitors
per day, but end up with totals for all Mondays, Tuesdays,
Wednesdays,etc.......

Other info: We are only open Monday - Saturday, so I only have those
dates across the top.

Here is a screenshot of the spreadsheet:
http://www.flickr.com/photos/jenkob/2628527135/


My ultimate end goal is to be able to get an average number of
visitors for each day of the week. (Example: Average Saturday
visitation- 12 people)

I have tried to modify this formula which I've used to count the
totals in my gender columns, for each age row:
=SUMPRODUCT(--(MOD(COLUMN(5:5),2)=0),5:5)

But it does not work because it only counts every *other* column, and
what I need to do is count every 12th column. I tried to modify the
above as follows:
MOD(...,12)

But when I checked it, the figure was incorrect. So there must be
something wrong.

Can anyone help?
 
Reply With Quote
 
 
 
 
Bernie Deitrick
Guest
Posts: n/a
 
      2nd Jul 2008
You need an offset to account for the first non-data columns:

If your first number to use is in Column ???, use
=SUMPRODUCT(--(MOD(COLUMN(5:5)-COLUMN($???$1),12)=0),5:5)

Replace the ??? with the column letter, like this for column B:
=SUMPRODUCT(--(MOD(COLUMN(5:5)-COLUMN($B$1),12)=0),5:5)

So, to get the average, you need to count the filled in cells, so use

=SUMPRODUCT((MOD(COLUMN(5:5)-COLUMN($B$1),12)=0)*5:5)/SUMPRODUCT((MOD(COLUMN(5:5)-COLUMN($B$1),12)=0)*(5:5<>"")*1)

HTH,
Bernie
MS Excel MVP


<(E-Mail Removed)> wrote in message
news:d60726bf-ce79-4266-943d-(E-Mail Removed)...
> Hello,
>
> I am trying to come up with a formula that will help in calculating
> averages in my visitor tracking spreadsheet. My spreadsheet has a lot
> of visitor demographics and head count data entered by day. Across the
> top, I have dates as column labels. Down the side, I have different
> visitor demographic age ranges as row labels. On the lowest row, I
> have a total of all the visitors in any given day.
>
> I've already figured out the formula to count the different age groups
> and genders. Now what I need is a formula to count the total visitors
> per day, but end up with totals for all Mondays, Tuesdays,
> Wednesdays,etc.......
>
> Other info: We are only open Monday - Saturday, so I only have those
> dates across the top.
>
> Here is a screenshot of the spreadsheet:
> http://www.flickr.com/photos/jenkob/2628527135/
>
>
> My ultimate end goal is to be able to get an average number of
> visitors for each day of the week. (Example: Average Saturday
> visitation- 12 people)
>
> I have tried to modify this formula which I've used to count the
> totals in my gender columns, for each age row:
> =SUMPRODUCT(--(MOD(COLUMN(5:5),2)=0),5:5)
>
> But it does not work because it only counts every *other* column, and
> what I need to do is count every 12th column. I tried to modify the
> above as follows:
> MOD(...,12)
>
> But when I checked it, the figure was incorrect. So there must be
> something wrong.
>
> Can anyone help?



 
Reply With Quote
 
tours@aldoleopold.org
Guest
Posts: n/a
 
      2nd Jul 2008
Thank you, that works!! The averages formula doesn't, but I think I
can work around that another way. (I know how many Saturdays are in a
season, so I can just do a formula based on the return result from the
total visitation per day.
 
Reply With Quote
 
Bernie Deitrick
Guest
Posts: n/a
 
      2nd Jul 2008
The average formula will work if the cells without values are blanks, rather than filled with
zeroes.

HTH,
Bernie
MS Excel MVP


<(E-Mail Removed)> wrote in message
news:00bf57f7-a4e3-4d51-8bb5-(E-Mail Removed)...
> Thank you, that works!! The averages formula doesn't, but I think I
> can work around that another way. (I know how many Saturdays are in a
> season, so I can just do a formula based on the return result from the
> total visitation per day.



 
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
how to count#cells w/= value in other column and not count blank c aganoe Microsoft Excel Worksheet Functions 4 9th Apr 2010 11:36 AM
How do I count # of cells with same value other column? aganoe Microsoft Excel Worksheet Functions 4 8th Apr 2010 11:30 AM
Count cells w/values in column if the data in column a matches cri mdcgpw Microsoft Excel Worksheet Functions 3 11th Jan 2009 09:00 PM
Count cells every 12th column tours@aldoleopold.org Microsoft Excel Misc 6 2nd Jul 2008 06:33 PM
Count number of cells and total in one column, based on another column suffix Pierre Microsoft Excel Worksheet Functions 5 31st Oct 2007 12:28 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:11 AM.