If I understand your question well, you should apply an aggregate command:
1) Organize your data so that you have one file and one row for one visit in it. Variables are ID and return_v .
2) Aggregate using SUM function:
/visit_n 'Return visits' = SUM(return_v).
You can invoke it from menu Data in SPSS Data Editor.
From: Kamau, Patrick [mailto:Pkamau@cdcnairobi.mimcom.net]
Sent: Monday, April 19, 2004 11:49 AM
Subject: Increasing a variable
I have a variable called 'return visits' that takes care of clients who have
come for another visit. For the initial visit, return visit=0 and
subsequent returns visits=1.
My problem is, some clients have had more than two 'return visits', so I
would like to have increasing numbers showing the real return, using the
date or month, i.e.
First visit =0
Second visit =1
Third visit =2 etc.
Your help will be appreciated.