SUMIF + IF/THEN Formula

Rana Gray

Board Regular
Joined
Jan 26, 2023
Messages
53
Office Version
  1. 365
Platform
  1. Windows
  2. Web
Hey Everyone,

I'm getting a little confused on writing this formula. This is what I have: =SUMIF(F9:F25,"*BMO*",K9:K25)+SUMIF(G9:G25,"*BMO*",K9:K25)

This is what I need to add: My range is currently set to K9:K25, however I want the sumif range to use the value in J9:J25 instead when there is a value and if not then use what is in the original range. I hope that makes sense - Based on reference image: if the "Limit" column has a value then add that to the SUM instead of the value in the "Balance" column otherwise just use the "Balance" column.

Thanks in advance!

** Edit to Add: I'm fine with using VBA if a formula isn't sufficient **

1678985926483.png
 
Last edited:

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
this this:
Excel Formula:
=IFERROR(SUMIFS(J9:J25,G9:G25,"BMO"),0)+IFERROR(SUMIFS(K9:K25,G9:G25,"BMO",J9:J25,""),0)
 
Upvote 0
Solution
You are a Genius <3
The marked solution has been changed accordingly. In your future questions, please mark the post as the solution that actually answered your question, instead of your feedback message as it will help future readers. No further action is required for this thread.
 
Upvote 0
The marked solution has been changed accordingly. In your future questions, please mark the post as the solution that actually answered your question, instead of your feedback message as it will help future readers. No further action is required for this thread.
Duly noted!! I'll be more careful on future posts, thank you!!
 
Upvote 0

Forum statistics

Threads
1,217,063
Messages
6,134,379
Members
449,870
Latest member
yuppies466

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top