We help IT Professionals succeed at work.
Get Started

What is the syntax to return a text string in an Excel SUMIF statement ?

Tocogroup
Tocogroup asked
on
72 Views
Last Modified: 2015-03-18
Hi All,

I am trying to use a SUMIF function in an Excel worksheet to total a number of amounts in a row where the corresponding column name for each amount ends in the text string "Cost".

So, in my example here,

=SUMIF(H2:DG2,RIGHT(H2:DG2,4)="Cost",H4:DG4)

I want to total any amount in range H4:DG4 that has a column heading (H2:DG2) which ends in the text "Cost".

I can't get it to work !

Any ideas ? Thanks for your help.
Toco
Comment
Watch Question
Grand Poobah
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2011
Commented:
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE