Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to "recode" data in Excel?

4,478 views
Skip to first unread message

zencaroline

unread,
Mar 26, 2007, 8:23:57 PM3/26/07
to
Hello,

I would like to recode data in Excel, i.e., making 5 become 1,
making 4 become 2, making 2 become 4, making 1 become 5, to change the
direction of negative-worded item questions.

Might anyone know how to accomplish this task in Excel?

I know SPSS can do this. But I need to recode the data in Excel
in order to do other tasks.

Thank you very much and look forward to your kind reply.

Please take care

Caroline

Gottfried Helms

unread,
Mar 27, 2007, 1:22:23 AM3/27/07
to
you may write a function in Excels basic.
function myRecode(a,v1,w1,v2,w2,v3,w3) as long

and do the recoding in the function body. To have it a bit
more flexible you may add default values in the function-header,
but I'm currently not aware, whether this is possible in Excel-
basic.

Gottfried Helms

Haris

unread,
Mar 27, 2007, 8:21:49 AM3/27/07
to
If you need to recode selected rows of data, write a nested IF
function and fill-down in a new variable. Something like:

=if(recode="Yes", 6-E2, E2).
"Recode" is a column that you would have to create to indicate rows
that need to be recoded. Those that are not recoed would be copied.

If your questions that need to be recoded are already in separate
columns, then just compute a new column with =6-OldColumn.

Harpo

unread,
Mar 30, 2007, 7:38:08 AM3/30/07
to

A very simple solution would be putting the function =ABS(A1-6) in a
new column, where "A1" refers to the cell with your old value.

0 new messages