LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2007)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 12 Jul 2007 17:09:03 -0500
Reply-To:     "Marks, Jim" <Jim.Marks@lodgenet.com>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         "Marks, Jim" <Jim.Marks@lodgenet.com>
Subject:      Re: Simple Code with less lines is possible?
Comments: To: Eugenio Grant <eugenio.grant@ipsos-ca.com>
Content-Type: text/plain; charset="US-ASCII"

IF ANY(var1, 1, 3, 8 ,90, 1090,82, 422, 764) var2 = 8.

If the values are text they need to be enclosed in quotations marks.

--jim

-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Eugenio Grant Sent: Thursday, July 12, 2007 5:01 PM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Simple Code with less lines is possible?

Is there a simple solution to this code.

IF (VAR1 = 1 ) VAR2 = 8.

IF (VAR1 = 3 ) VAR2 = 8.

IF (VAR1 = 8 ) VAR2 = 8.

IF (VAR1 = 90 ) VAR2 = 8.

IF (VAR1 = 1090) VAR2 = 8.

IF (VAR1 = 82) VAR2 = 8.

IF (VAR1 = 422) VAR2 = 8.

IF (VAR1 = 764) VAR2 = 8.

Something like

IF (VAR1 IN 1,2,8,90,etc) VAR2 = 8.

Regards,


Back to: Top of message | Previous page | Main SPSSX-L page