Excel Formating Help

#1
Hello!

How can i format a table in Excel so, if one of the cells in the table is a text, it is counted as a certain value in another SUM cell

For example :
A B C D E F
1 8 *text* 6 9 3 SUM1
2 *text* 3 4 *text* 2 SUM2

I want to sum the whole line but the B1, A2, D2 should represent a certain value i want. The text would be random in the table. Basically i just want the sum to read that text as a default value. Sorry for not being more clear. Thank you for your patience

UPDATE - So I thought I could either format the whole table so "specific text" is read as "specific value" in any formula, or make the sum formula count the "specific text" cells and add ("times text appears")x("specific value") to the actual sum but i don't know if that is possible or if it is, how to do it. I.E SUM2=SUM(A2:F2)+(Count Text)*(Specific Value)
 
Last edited:
#2
You're almost there - you can use COUNTIF (or COUNTIFS if multiple strings are to be assigned the same value).

Code:
=SUM(A1:F1)+COUNTIF(A1:F1, "=my text")*(value)