SUM function to account for Text

AntBlabby8

Board Regular
Joined
Apr 18, 2002
Messages
190
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!
 

Some videos you may like

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Weaver

Well-known Member
Joined
Sep 10, 2008
Messages
5,196
What does your formula look like?

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

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Perhaps

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

JoeMo

MrExcel MVP
Joined
May 26, 2009
Messages
17,103
Office Version
365, 2010
Platform
Windows
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!.
 

AntBlabby8

Board Regular
Joined
Apr 18, 2002
Messages
190
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!
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,757
Messages
5,513,226
Members
408,941
Latest member
jackson1478

This Week's Hot Topics

  • Sort code advice please
    Hi, I have the code below which im trying to edit but getting a little stuck. This was the original code which worked fine,columns A-F would sort...
  • SUMPRODUCT with nested If statement
    Hi everyone, Hope you're all well. I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT...
  • VBA - simple sort is killing me!
    Hello all! This should be so easy, but not for me, apparently! I have a table of data that can be of varying lengths and widths. My current macro...
  • Compare Two Lists
    I have two Lists and I need to be able to Identify differences between them. List 100 comes from a workbook - the other is downloaded form the...
  • Formula that deducts points for each code I input.
    I am trying to create a formula that will have each student in my class start at 100 points and then for each code that I enter (PP for Poor...
  • Conditional formatting formula required for day of week and a value
    Hi, I have a really simple spreadsheet where column A is the date, column B is the activity total shown as a number and column C states the day of...
Top