Hi,

I have a table like below and i am trying to come up with last two columns Den and Num where Den is the sum of the all columns Itm1 through Itm6 only if the value in each column is >0 and similarly the column Num is the sum of columns Itm1 through Item6 only where value in column is 1.

Any help will be greatly appreciated.

Thanks,

a 1 -1 1 1 1 1 5 5

b 1 2 1 1 1 1 7 5

c 1 1 1 1 1 1 6 6

d 1 1 1 1 1 1 6 6

e 1 1 1 1 1 1 6 6

f 2 1 1 1 1 1 7 5

g 1 1 1 1 1 1 6 6

h 1 1 1 1 1 1 6 6

i 1 1 1 1 1 1 6 6

j 1 1 1 1 1 1 6 6