Excel - Assign value to text cell

T

TD

In Excel, I need to assign values to a text cell.


A B C D E
1 Fixed Value 3 5 8 Total
2 Item1 x x 11
3 Item2 x 5

In a matrix A1:E3, E2 bears the total of B2:D2, E3 totals B3:D3 and so on.
All cells in column B bears fixed value 3, col C bears fixed value 5 and so
on, PROVIDED x is marked in the cell.

For e.g. if x is marked on B2, it should then be assigned fixed value 3, if
x is on C3 it is then assigned fixed value 5. If cell is not marked, its
value remains zero.

Even though we can see x marked on the cell, it should actually bear the
value so that sum(B2:D2) = 11 on E2 in above example.

Can anyone help me achieve this assigning value to a text cell provided cell
is marked.
 
J

JE McGimpsey

TD said:
In Excel, I need to assign values to a text cell.


A B C D E
1 Fixed Value 3 5 8 Total
2 Item1 x x 11
3 Item2 x 5

In a matrix A1:E3, E2 bears the total of B2:D2, E3 totals B3:D3 and so on.
All cells in column B bears fixed value 3, col C bears fixed value 5 and so
on, PROVIDED x is marked in the cell.

For e.g. if x is marked on B2, it should then be assigned fixed value 3, if
x is on C3 it is then assigned fixed value 5. If cell is not marked, its
value remains zero.

Even though we can see x marked on the cell, it should actually bear the
value so that sum(B2:D2) = 11 on E2 in above example.

Can anyone help me achieve this assigning value to a text cell provided cell
is marked.

One way:


E2: =SUMPRODUCT(--(B2:D2="x"),$B$1:$D$1)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top