#1   Report Post  
Posted to microsoft.public.excel.misc
elephant
 
Posts: n/a
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.misc
elephant
 
Posts: n/a
Default UNIQUE VALUE

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

  #4   Report Post  
Posted to microsoft.public.excel.misc
Ragdyer
 
Posts: n/a
Default 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


  #5   Report Post  
Posted to microsoft.public.excel.misc
elephant
 
Posts: n/a
Default UNIQUE VALUE

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



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
filtering unique in multiple columns umniy Excel Worksheet Functions 4 March 9th 06 01:06 PM
code not unique find latest date Barbara Wiseman Excel Discussion (Misc queries) 3 December 11th 05 08:50 AM
Unique numbers if between dates Jeremy Ellison Excel Worksheet Functions 3 December 9th 05 10:11 AM
count unique with conditions \ditzman via OfficeKB.com\ Excel Worksheet Functions 8 July 8th 05 12:41 PM
Count Unique Values annie Excel Worksheet Functions 1 June 9th 05 07:19 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"