ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   UNIQUE VALUE (https://www.excelbanter.com/excel-discussion-misc-queries/81060-unique-value.html)

elephant

UNIQUE VALUE
 
Hi people, I have a formula that picks the last value in a row. This is
a case where clients are identified by a the same number every time
they visit a clinic. My formula only picks the last visit. How do i
pick the first visit? Thanx in advance.
A B
3 1 =IF($A3-$A4=0,0,1)
8 1
17 0
17 0
17 0
17 0
17 1
18 0
18 1
19 0


Bob Phillips

UNIQUE VALUE
 
Use

=IF($A3=$A2,0,1)

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"elephant" wrote in message
oups.com...
Hi people, I have a formula that picks the last value in a row. This is
a case where clients are identified by a the same number every time
they visit a clinic. My formula only picks the last visit. How do i
pick the first visit? Thanx in advance.
A B
3 1 =IF($A3-$A4=0,0,1)
8 1
17 0
17 0
17 0
17 0
17 1
18 0
18 1
19 0




Ragdyer

UNIQUE VALUE
 
If the visits are not contiguous, try these:

First:
=IF(COUNTIF($A$2:A2,A2)=1,1,0)

Last:
=IF(COUNTIF(A2:$A$11,A2)1,0,1)

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"elephant" wrote in message
oups.com...
Hi people, I have a formula that picks the last value in a row. This is
a case where clients are identified by a the same number every time
they visit a clinic. My formula only picks the last visit. How do i
pick the first visit? Thanx in advance.
A B
3 1 =IF($A3-$A4=0,0,1)
8 1
17 0
17 0
17 0
17 0
17 1
18 0
18 1
19 0



elephant

UNIQUE VALUE
 
Thanks Bob. However, the result is still the same as my earlier formula


elephant

UNIQUE VALUE
 
Cheers Ragdyer! That's now working. I will however, try to understand
the logic better. Thanx



All times are GMT +1. The time now is 03:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com