Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 359
  • Last Modified:

Sum in Excel to ignore a text field

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
bryanscott53
Asked:
bryanscott53
1 Solution
 
SafetyFishCommented:
Try Sumif([range], <> "", [range])

<> means does not equal (if you didn't know)
0
 
Rob HensonIT & Database AssistantCommented:
Your formula:

=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
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
SafetyFishCommented:
My bad, you need quotes around the criteria:

=SUMIF([sum range], "<> "" ",[sum range])
0
 
Rob HensonIT & Database AssistantCommented:
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
 
bryanscott53Author Commented:
Thanks safetyfish this worked great
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now