3 min readfrom Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

Trying to Incorporate an IF() Statement into a SUMIFS() Function that Disregards a Value Based on a Specific Word from a Column Adjacent to that Value

I am trying to create something within my credit card SUMIFS() formula that would not include any transaction type labeled "Work" if a checkbox is selected as TRUE. This current formula works, but it's almost the same formulas twice that I would like to combine if possible. I put *** around the different lines of code in the second IF() formula from the first SUMIFS() formula.

= SUMIFS( [Amounts Column], [Statement Date Column], ">="&[Beginning of CC History], [Statement Date Column], "<="&[End of Current Month], [CC Name Column], [CC Name] ) -IF( *** [CheckBox]=TRUE ***, SUMIFS( [Amounts Column], [Statement Date Column], *** ">="&[Beginning of Current Month] ***, [Statement Date Column], "<="&[End of Current Month], [CC Name Column], [CC Name] *** [Transaction Type Column], *** *** "Work" *** ), 0 ) 

The reason the first SUMIFS() starts at the beginning of my entire credit card history is that it includes the payments that are subtracted out. The reason the second SUMIFS() starts at just the beginning of the month is that I only want to subtract out everything labeled "Work" for just that month, otherwise it would do them since the beginning.

The [CC Name] is for multiple different credit cards. Elsewise I would have just subtracted the final "Work" totals from the credit card totals calculation, but I need them separated out.

Ultimately, I would like something like this...

= SUMIFS( [Amounts Column], [Statement Date Column], ">="&[Beginning of CC History], [Statement Date Column], "<="&[End of Current Month], [CC Name Column], [CC Name], *** [If checkbox is TRUE then don't include "Work" Values from the Month] *** ) 

I tried something like [Transaction Type Column], IF(Checkbox=TRUE,"<>"&Work but that just returns 0 if the checkbox is unchecked and some odd number that I can't quite figure out how it's being calculated when checked. Most other things I've tried just gave some sort of error. I don't know if combining these is actually possible with the way SUMIFS() is structured, but figured I'd ask here for those better at excel than me. Hopefully this makes sense and you all can follow what I'm asking and trying to do.

EDIT: Wanted to add that the setup that this is pulling from is as follows...

  • Column A: Credit Card Name
  • Column B: Transaction Amount/Value
  • Column C: Transaction Type
  • Column D: Statement Date
submitted by /u/TacticalPidgeon
[link] [comments]

Want to read more?

Check out the full article on the original site

View original article

Tagged with

#Excel alternatives for data analysis
#AI formula generation techniques
#no-code spreadsheet solutions
#formula generator
#natural language processing for spreadsheets
#generative AI for data analysis
#Excel compatibility
#Excel alternatives
#rows.com
#financial modeling with spreadsheets
#cloud-based spreadsheet applications
#SUMIFS
#IF
#work
#credit card
#formula
#checkbox
#transaction type
#transaction amount
#amounts column