SPSS Statistics

SPSS Statistics

Your hub for statistical analysis, data management, and data documentation. Connect, learn, and share with your peers! 

 View Only
  • 1.  delete a cell in an spss data file

    Posted Fri October 28, 2022 05:17 PM
    How do I delete a single cell (or a short set of three or four cells in a row, not the whole row) in an SPSS data file?  In Excel this would be simple.  But I cannot find a command to do that in SPSS.

    ------------------------------
    Jeffrey Broadbent
    ------------------------------

    #SPSSStatistics


  • 2.  RE: delete a cell in an spss data file

    Posted Fri October 28, 2022 05:53 PM
    I'm not sure what you mean by deleting cells.  Do you mean setting those values to missing?  Excel doesn't care about the shape of your data, which is a frequent source of errors, but datasets in Statistics and traditional databases are always rectangular, so you can't literally delete cells within a case.

    Using the Data Editor Data View, you can click in a cell and make it empty, and there are syntax ways to do this, too, but Statistics is not a spreadsheet.





  • 3.  RE: delete a cell in an spss data file

    Posted Fri October 28, 2022 07:12 PM
    Thanks.  I do know how to make the cell empty by using the cut or clear commands.  I was wondering if it was possible in SPSS to delete a cell and have the rest of the column of cells below it shift upwards (like it does in Excel)?

    ------------------------------
    Jeffrey Broadbent
    ------------------------------



  • 4.  RE: delete a cell in an spss data file

    Posted Fri October 28, 2022 07:24 PM
    Not directly.  You can achieve that effect with a LAG function in COMPUTE or the SHIFT VALUES command, but that would be awkward.

    --