I have a file with more than 250 variables and more than 100 cases. Some of these variables have an error in decimal dot (20445.12 should be 2.044512).
I want to modify programatically these data, I found a possible way in a Visual Basic editor provided by SPSS (I show you a screen shot below), but I have an absolute lack of knowledge.
- How can I select a range of cells in this language?
- How can I store the cell once modified its data?
--- EDITED NEW DATA ---- Thank you for your fast reply.
The problem now its the number of digits that number has. For example, error data could have the following format:
Case A) 43998 (five digits) ---> 4.3998 as correct value. Case B) 4399 (four digits) ---> 4.3990 as correct value, but parsed as 0.4399 because 0 has been removed when file was created.
Is there any way, like:
IF (NUM < 10000) THEN NUM = NUM / 1000 ELSE NUM = NUM / 10000
Or something like IF (Number_of_digits(NUM)) THEN ...
Thank you.

there's no need for VB script, go this way:
open a syntax window, paste the following code:
Replace
var1 var2 var3 var4with the names of the actual variables you need to change. For variables that are contiguous in the file you may usevar1 to var4.Replace
vr=vr/10000with whatever mathematical calculation you would like to use to correct the data.Replace
"filepath\My corrected data.sav"with your path and file name.WARNING: this syntax will change the data in your file. You should make sure to create a backup of your original in addition to saving the corrected data to a new file.