View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Piscator Piscator is offline
external usenet poster
 
Posts: 10
Default Create a function to add one to the count

On Nov 28, 7:30 pm, Lawrence
wrote:
Bernard you have been so helpful I want to thank you. I was thinking that if
I showed you what I was working with and for it would help, so here is a
sample of what the data looks like:
A B C D E
Date Name Room success by
1-Nov john 1 y LR
2-Nov jane 1 y LR
2-Nov bill 1 y LR
2-Nov tony 1 y geo
3-Nov alfred 2 n/a geo
3-Nov horatio 2 n/a LR
5-Nov gene 2 n geo
6-Nov hillary 3 n LR

Here is what the table that I'm trying to auto update looks like. The
countif formula worked for the totals under Y, N and N/A, but I couldn't get
it to work properly for each persons individual subtotals

Attempts Y N N/A
LR
geo
Totals 0 4 1 2


I'm not sure what the 'Attempts' is as your total is zero. Your Total
for N is 1 but I think should be 2.

My calculation shows
Y N N/A
LR 3 1 1
geo 1 1 1
Totals 4 2 2

Using the formula
=SUM(IF($E$3:$E$10=$A14,IF($D$3:$D$10=C$13,1,0),0) )
which needs to be entered with Ctrl-Shift-Enter
E3:E10 is initials (LR, geo)
A14 is the cell containing "geo" entered as a variable so you can add
more names easily
D3:D10 is Sucess
C13 is Y, N or N/A, entered as a reference so you can easily copy/
paste