Solved

# Sum in Excel to ignore a text field

Posted on 2011-09-13
298 Views
I need to sum 5 columns, in each of the columns if the header is blank then the formula inputs "" (here is a copy of one of the columns formulas - =IF(\$AY\$1="","",SUM(AZ5:AZ51)) )

When I try to add up all 5 columns I get a #Value! error.

can you help?
0
Question by:bryanscott53

LVL 4

Expert Comment

Try Sumif([range], <> "", [range])

<> means does not equal (if you didn't know)
0

LVL 31

Expert Comment

=IF(\$AY\$1="","",SUM(AZ5:AZ51)))

Though summing column AZ it is looking at the header for column AY, is this correct?

Where are you putting the formula? I am assuming below AZ51 eg in AZ52.

I have tried replicating the formula and it seems to work.

Thanks
Rob H
0

LVL 50

Expert Comment

Hello,

which 5 columns do you need to sum?

The first part of your IF statement references column AY. The Sum() function in the IF statement references AZ. Is that your intention?

What is the formula that produces the #Value! error?

Sum() works fine on a mix of text and numbers.

Can you post a sample file that presents the problem?

cheers, teylyn
0

LVL 4

Accepted Solution

SafetyFish earned 500 total points
My bad, you need quotes around the criteria:

=SUMIF([sum range], "<> "" ",[sum range])
0

LVL 31

Expert Comment

Just re-read the problem and interpreted slightly different.

I assume you have the formula in say columns AV to AZ and then adding these up but resulting in an error. If one the formulas is generating the blank, this could cause the error although the sum would normally ignore blank or text values.

Try changing the formula to return 0 or sum rather than "".

Thanks
Rob H
0

Author Closing Comment

Thanks safetyfish this worked great
0

## Featured Post

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

#### Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!