Link to home
Start Free TrialLog in
Avatar of MeowserM
MeowserM

asked on

Adding only records that meet a criteria

Hello:

I have a spreadsheet with several columns in it.  The values that I want to add are in the columns.  I only want to add the columns where the heading for that column is "add".

Of course I can just choose those cells, but I am looking for a formula that will only add the values when the heading(or cell above them say "add")

I am attaching a small example.

Thank you! exampleofadd.xlsx
Avatar of barry houdini
barry houdini
Flag of United Kingdom of Great Britain and Northern Ireland image

Try using SUMIF function, i.e. this formula

=SUMIF(B$2:J$2,"add",B3:J3)

regards, barry
Avatar of MeowserM
MeowserM

ASKER

awesome - can I use this with countif too?
ASKER CERTIFIED SOLUTION
Avatar of barry houdini
barry houdini
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That's perfect - Thank you Barry!!