Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Counting while diminishing

I'm creating an attendance worksheet. At the top I have dates increasing
from left to right. Right now I'm using a counta formula to calculate
attendance percentage based on the total number of events (counta / total
events).

What I want to do is, as time proceeds and more events are added, have the
right-most cell I'm counting be worth 1 and every cell left of that be worth
the cell to its immediate right less 5%.

Here's a visual:
Currently:
Yes + Yes + (blank) + Yes + Yes = 4/5 = 80%

What I would like:
..8145 + .8574 + 0 + .95 + 1 = 3.6219/4.5244 = 80.05%

The idea is to make more recent attendance worth more than past attendance.
I want this calculation to be all inclusive in one cell if possible so I can
leave attendance binary "Yes" and (blank).

I've come close to figuring this out on my own but I can't figure out how to
count the number of cells between one cell and another. Alternatively, if
someone can answer this one I could probably come up with something.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Counting while diminishing

I would put this in A1:
=.95*B1
and drag to the right filling A1:D1
Then put
1
in E1

Then put the yes/blanks in A2:E2
and this in F2:
=SUMPRODUCT(--($A2:$E2="yes"),$A$1:$E$1) / SUM($A$1:$E$1)
(and format the cell as a percentage with 2 decimal positions.)

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html


If you find the numbers in row 1 irritating to view, you can hide that row.

Nolan wrote:

I'm creating an attendance worksheet. At the top I have dates increasing
from left to right. Right now I'm using a counta formula to calculate
attendance percentage based on the total number of events (counta / total
events).

What I want to do is, as time proceeds and more events are added, have the
right-most cell I'm counting be worth 1 and every cell left of that be worth
the cell to its immediate right less 5%.

Here's a visual:
Currently:
Yes + Yes + (blank) + Yes + Yes = 4/5 = 80%

What I would like:
.8145 + .8574 + 0 + .95 + 1 = 3.6219/4.5244 = 80.05%

The idea is to make more recent attendance worth more than past attendance.
I want this calculation to be all inclusive in one cell if possible so I can
leave attendance binary "Yes" and (blank).

I've come close to figuring this out on my own but I can't figure out how to
count the number of cells between one cell and another. Alternatively, if
someone can answer this one I could probably come up with something.


--

Dave Peterson
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
Counting Suleman[_2_] Excel Discussion (Misc queries) 4 August 1st 08 09:47 PM
counting function but not double counting duplicates JRD Excel Worksheet Functions 2 November 7th 07 06:43 PM
Counting down Bikertyke Excel Worksheet Functions 5 December 6th 06 11:45 PM
Counting rows, then counting values. Michael via OfficeKB.com Excel Discussion (Misc queries) 7 August 4th 05 10:57 PM
Counting names in a column but counting duplicate names once TBoe Excel Discussion (Misc queries) 9 May 11th 05 11:24 PM


All times are GMT +1. The time now is 09:00 PM.

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"