I have tried the below formula given to me yesterday...but am getting a decimal number...see data below
I want to count unique names for a certain payperiod (this data doesn't show it but there may be different payperiods in the list. G2 being a reference to a payperiod on another sheet i.e. Sheet 2 = 2/10
=SUM(IF(A2:A1000=sheet2!G2,1/(COUNTIF(e2:e1000,e2:e1000)),0))
(a) (b) (c) (d) (e)
Payperiod DATE Units ROOM NAME
2/10/07 2/8/07 sicu 502bw o'dowd
2/10/07 2/8/07 picu 307b mayorga
2/10/07 2/8/07 nscu bed 2 bowen
2/10/07 2/8/07 ctu bed16 karides
2/10/07 2/8/07 6 monti 604 hom
2/10/07 2/8/07 5 monti 513d hills
2/10/07 2/8/07 4 monti 412w golin
2/10/07 2/8/07 4 cohen 469dl ingisani
2/10/07 2/9/07 4 cohen 469dr zeitchek
2/10/07 2/9/07 4 cohen 469wl gibbard
2/10/07 2/9/07 4 cohen 469wr timpone
2/10/07 2/9/07 3 Tower 395d whelan
2/10/07 2/10/07 3 DSU 352w schwarz
2/10/07 2/10/07 3 Cohen 372w pallas
2/10/07 2/10/07 2 Cohen 268d potaphshyn
2/10/07 2/10/07 2 Cohen 268W nadim
2/10/07 2/8/07 3 Tower 393wr mayorga
2/10/07 2/8/07 SICU 502bw o'dowd
I want to count unique names for a certain payperiod (this data doesn't show it but there may be different payperiods in the list. G2 being a reference to a payperiod on another sheet i.e. Sheet 2 = 2/10
=SUM(IF(A2:A1000=sheet2!G2,1/(COUNTIF(e2:e1000,e2:e1000)),0))
(a) (b) (c) (d) (e)
Payperiod DATE Units ROOM NAME
2/10/07 2/8/07 sicu 502bw o'dowd
2/10/07 2/8/07 picu 307b mayorga
2/10/07 2/8/07 nscu bed 2 bowen
2/10/07 2/8/07 ctu bed16 karides
2/10/07 2/8/07 6 monti 604 hom
2/10/07 2/8/07 5 monti 513d hills
2/10/07 2/8/07 4 monti 412w golin
2/10/07 2/8/07 4 cohen 469dl ingisani
2/10/07 2/9/07 4 cohen 469dr zeitchek
2/10/07 2/9/07 4 cohen 469wl gibbard
2/10/07 2/9/07 4 cohen 469wr timpone
2/10/07 2/9/07 3 Tower 395d whelan
2/10/07 2/10/07 3 DSU 352w schwarz
2/10/07 2/10/07 3 Cohen 372w pallas
2/10/07 2/10/07 2 Cohen 268d potaphshyn
2/10/07 2/10/07 2 Cohen 268W nadim
2/10/07 2/8/07 3 Tower 393wr mayorga
2/10/07 2/8/07 SICU 502bw o'dowd