Forum Discussion
Steven Elphick
Feb 06, 2018Copper Contributor
Excel formula help
Hi there,
I am looking to find the easiest formula solution for the following.
I wish to check if table a5:a32 contains the word "MTD", if so, it takes data from a cell in the same row fr...
- Feb 06, 2018
Hi Steven
If I am understanding you right, try this formula:
=SUMIF(A2:A5,"MTD",B2:B5)
Change A to your desired column where the MTD text is located.
Change B to where the $ column is located.
Basically, this formula will do what you have asked.
I have also attached a sample file to demo the above for you to see it in action.
Let us know how you go?
Cheers
Damien
H S Desai
Feb 26, 2018Copper Contributor
Hi Damien
I was looking for an answer which is exactly opp of this solution.Meaning I want to exclude any rows that contain the word "MTD" and not include in the sum total. How do I write that formula?
sumif(A1:A5, NOT "MTD", B1:B5)
Logic is as above but am not sure what syntax to use
Damien_Rosario
Feb 26, 2018Silver Contributor
Hi H S Desai
Try:
=SUMIF(A2:A5, "<>MTD",B2:B5)
<> means does not equal. Make sure it's in the " " as well.
Let me know how you go?
Cheers
Damien
Try:
=SUMIF(A2:A5, "<>MTD",B2:B5)
<> means does not equal. Make sure it's in the " " as well.
Let me know how you go?
Cheers
Damien
- H S DesaiFeb 26, 2018Copper Contributor
got it works perfectly. Also tried the sumifs function to add more conditions to exclude. Thank you
- Damien_RosarioFeb 26, 2018Silver ContributorGlad to help!
All the best
Damien