# SUM function to account for Text

#### AntBlabby8

##### Board Regular
I have a very wide spreadsheet, with many columns. In three columns--L, T, and AB--I have an IF formula that can render a sum of three columns to the left in each case, or the text "NO PRODUCT." In Col. AF, I then have a formula that says on Row 3, for example, =SUM(L3,T3,AB3). The problem I am having is if there is NO PRODUCT in either L, T, or AB, I am getting a VALUE! error. And because any or all of the three can have this NO PRODUCT in it, I don't know how to write a formula to get a total, and not a value error. HELP!

### Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
What does your formula look like?

I'm surprised you're having this problem, since the sum function seems to ignore text.

Perhaps

=IF(COUNT(L3,T3,AB3)>0,SUM(L3,T3,AB3),"")

I have a very wide spreadsheet, with many columns. In three columns--L, T, and AB--I have an IF formula that can render a sum of three columns to the left in each case, or the text "NO PRODUCT." In Col. AF, I then have a formula that says on Row 3, for example, =SUM(L3,T3,AB3). The problem I am having is if there is NO PRODUCT in either L, T, or AB, I am getting a VALUE! error. And because any or all of the three can have this NO PRODUCT in it, I don't know how to write a formula to get a total, and not a value error. HELP!
Excel's SUM function assigns a zero value to text, so the appearance of the text "NO PRODUCT" in any or all of the cells you are summing should not produce an error value. Check to see if one or more of the cells you are summing already contains a #VALUE!.

For some reason, the COUNT formula works. I am not sure why, but it does! I guess it is taking just the numbers as the text is not greater than zero theoretically? Anyhow, GREAT! I see what may be the issue. The column is formatted as ACCOUNTING. So it looks like TEXT but it isn't. That must be the problem. I see the words, but Excel sees the error. Hmmm. Anyhow, it's fabulously working now with that formua. Bravo, Mr Excel, to go-to place for us dangerous amateurs at Excel! THANKS AGAIN!

Replies
3
Views
182
Replies
4
Views
224
Replies
4
Views
207
Replies
6
Views
315
Replies
3
Views
147

### Forum statistics

1,221,053
Messages
6,157,640
Members
451,426
Latest member
VinnyDoesntKnowExcelCode

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back