Refer to the corresponding Cell in another column in SUMIFS

SanjayGMusafir

Well-known Member
Joined
Sep 7, 2018
Messages
1,339
Office Version
  1. 2021
Platform
  1. MacOS
Hi Experts

I'm using a SUMIFS formula that was working fine till today. Now I want a new dimension added to it which I'm not able to figure out. If you may please help.

Required -
If there is some value in Banks[Less] and there is a corresponding Value in Banks[Add] then it should subtract that amount from the total. But should ignore all such values in Banks[Add] where there is no value/blank in Banks[Less].

The formula I'm using right now is...

Thanks in Advance

Excel Formula:
=IFS(TODAY()<DATE(YEAR(TODAY()),8,2),
ROUND(50000-SUMIFS(Banks[Less],Banks[Acc],"CC SH ICICI",Banks[D1],"<>"&"Petrol",Banks[Dt],">="&DATE(YEAR(TODAY())-1,8,2),Banks[Dt],"<"&DATE(YEAR(TODAY()),8,2),Banks[Dt],"<="&TODAY()),2),
TRUE,
ROUND(50000-SUMIFS(Banks[Less],Banks[Acc],"CC SH ICICI",Banks[D1],"<>"&"Petrol",Banks[Dt],">="&DATE(YEAR(TODAY()),8,2),Banks[Dt],"<"&DATE(YEAR(TODAY())+1,8,2),Banks[Dt],"<="&TODAY()),2))
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
I solved it by doing...

Any better way of doing it...

Excel Formula:
=IFS(TODAY()<DATE(YEAR(TODAY()),8,2),
ROUND(50000-
(SUMIFS(Banks[Less],Banks[Acc],"CC SH ICICI",Banks[D1],"<>"&"Petrol",Banks[Dt],">="&DATE(YEAR(TODAY())-1,8,2),Banks[Dt],"<"&DATE(YEAR(TODAY()),8,2),Banks[Dt],"<="&TODAY())
-SUMIFS(Banks[Add],Banks[Less],"<>"&"",Banks[Acc],"CC SH ICICI",Banks[D1],"<>"&"Petrol",Banks[Dt],">="&DATE(YEAR(TODAY())-1,8,2),Banks[Dt],"<"&DATE(YEAR(TODAY()),8,2),Banks[Dt],"<="&TODAY())),2),
TRUE,
ROUND(50000-
(SUMIFS(Banks[Less],Banks[Acc],"CC SH ICICI",Banks[D1],"<>"&"Petrol",Banks[Dt],">="&DATE(YEAR(TODAY()),8,2),Banks[Dt],"<"&DATE(YEAR(TODAY())+1,8,2),Banks[Dt],"<="&TODAY())
-SUMIFS(Banks[Add],Banks[Less],"<>"&"",Banks[Acc],"CC SH ICICI",Banks[D1],"<>"&"Petrol",Banks[Dt],">="&DATE(YEAR(TODAY()),8,2),Banks[Dt],"<"&DATE(YEAR(TODAY())+1,8,2),Banks[Dt],"<="&TODAY())),2))
 
Upvote 0

Forum statistics

Threads
1,213,515
Messages
6,114,080
Members
448,548
Latest member
harryls

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