replacing numbers in a cell

C

catspore

How to replace numbers in a cell eg if 1 to 3, if 3 to 2, if 2 to 3. Trying
to reverse score for questionnaire. Possible to create a formula instead of
doing manually?
 
K

Kaman

Create a column (later to be hidden) next to the data u want to change. In
this new column, put your =IF(A1=1,3,(IF(A1=3,2,(IF(A1=2,3))))). This should
give you the correct numbers. Then you can copy the column and paste
specuial (values only) it in your original column. Hide your newly created
column.

You can next up to 7 if then statements...if more than than you will need to
do VLookup or something different.
 
S

Santipong

Try this:

=Lookup(A1,{1,2,3},{3,3,2}) or

Enter

=Sum(If(A1={1,2,3},{3,3,2})) or

Enter

=Vlookup(A1,{1,3;2,3;3,2},2,0)

Enter

Hope this helps.
 
S

Santipong

Try:

=Lookup(A1,{1,2,3},{3,3,2}) or

=Vlookup(A1,{1,3;2,3;3,2},2,0) or

=Sum(if(A1={1,2,3},{3,3,2}))

Enter

HTH
 
S

Santipong

Try:

=Lookup(A1,{1,2,3},{3,3,2}) or

=Vlookup(A1,{1,3;2,3;3,2},2,0) or

=Sum(if(A1={1,2,3},{3,3,2}))

Enter

HTH
 
Top