in

Convert to presence-absence table

Another question, since you guys are so good:

I have a table like this:


1      obj1      obj3      obj4
2      obj2            
3      obj2      obj3      
4      obj3      obj4      
5      obj3      obj4      


which I would like to convert to what is often called a presence-absence matrix, like so:


      Obj1      Obj2      Obj3      Obj4
1      1      0      1      0
2      0      1      0      0
3      0      1      1      0
4      0      0      1      1
5      0      0      1      1


Is it possible to convert the first kind of table into the second kind automatically in Excel?

Thanks!
Movie Stars

Solution: Convert to presence-absence table

Here is my answer...

1. Enter your original table in A1:D5

2. Enter the headings in F1:I1

3. In F2, enter this formula
   =COUNTIF($B1:$D1,F$1)

4. Copy the formula from F2 and pasted it into F2:I5

5. In E2, enter this formula
   =A1

6. Copy the formula from E2 and paste it into E2:E5

7. Select E1:I5 and Copy

8. With the same range still selected, do Edit - Paste Special - Check "Values" - OK


Ture Magnusson
Karlstad, Sweden