+ Reply to Thread
Results 1 to 4 of 4

Thread: Delete cells/replace data with empty cell using syntax

  1. #1
    Points: 1,549, Level: 22
    Level completed: 49%, Points required for next Level: 51

    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Delete cells/replace data with empty cell using syntax



    Hi there

    I have the follow problem:

    In a number of my variables, I have data that is "0.00" and shows up in Data view and in any analysis I do as ".0". This is because I entered in 0s.

    I would now like to replace the ".0" with nothing. I.e. make it a blank cell. I managed to do this in Data view using Edit > Replace. I searched for ".0" and didn't put anything in the replace field.

    However, I need to be able to do the same thing using the syntax file.

    SPSS can find the cells and replace it with a number, such as 999 when I do the following:

    RECODE FHCOMBINED1990 (0.00=999).
    It works when I put in a number. The problem is I want to make those cells empty/blank.

    So, if I don't put in a number, it gives me an error:

    RECODE FHCOMBINED1990 (0.00=).
    RECODE FHCOMBINED1990 (0.00=.).
    RECODE FHCOMBINED1990 (0.00='').

    All give me errors.

    How can I do this? Any ideas?

    Thanks so much!

  2. #2
    Points: 1,549, Level: 22
    Level completed: 49%, Points required for next Level: 51

    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Nevermind, I got it. It is RECODE FHCOMBINED1990 (0=SYSMIS).

    Thanks!

  3. #3
    Points: 1,130, Level: 18
    Level completed: 30%, Points required for next Level: 70

    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Delete cells/replace data with empty cell using syntax

    Hi,

    I need help on a similar problem. My data is in excel spreadsheet. Several cells are empty because of the nature of the data. When I take this to spss, the empty cells contain dots ("."). I want to convert those to 999 so that spss treats them as missing data. What is the syntax for that?

    Thanks!

  4. #4
    Points: 2, Level: 1
    Level completed: 3%, Points required for next Level: 48

    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Delete cells/replace data with empty cell using syntax


    RECODE variable (SYSMIS = 999).

    Where variable is the name of the variable which contains the dots

+ Reply to Thread

Similar Threads

  1. SPSS Syntax for Value labeling Data
    By hmanhertz in forum SPSS
    Replies: 3
    Last Post: 03-09-2011, 11:47 AM
  2. Replies: 2
    Last Post: 02-17-2011, 02:09 AM
  3. Replies: 2
    Last Post: 12-30-2010, 09:22 PM
  4. help with analysing data - cell sizes
    By azndude in forum Psychology Statistics
    Replies: 0
    Last Post: 05-26-2009, 10:24 AM
  5. SPSS syntax for missing data
    By psychologygirl in forum SPSS
    Replies: 2
    Last Post: 08-30-2008, 05:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts








Advertise on Talk Stats