• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

is it possible to subtract 2 sumif in single function

r_2

Member
Hi,


Iam working in different excel sheet & prepare a summary report on daily basis, i need help on sumif data, where i can subtract 2 sumif(result) @ a time.


Ex:=sumif(may!$C$2:$C$21,"=beta",may!$H$2:$H$21)+SUMIF(june!$D$2:$D$20,"=beta",june!$H$2:$H$20)-SUMIF(may!$C$2:$C$21,"=beta",may!$I$2:$I$21)+SUMIF(june!$D$2:$D$20,"=beta",june!$I$2:$I$20)


But i am getting the value of last 2 sumif (after subtraction).


I have try to put ()between sumif to differntiate the two, but getting error


Means i need to add 2 criteria & again i need there difference of it.

Is it possible to make it in single function or i have to separately put the two different sumif function & later on subtract the two results,ex B2-C2.
 
Hi r_2,


Welcome to this forum.


can u plz upload the workbook here?


http://chandoo.org/forums/topic/posting-a-sample-workbook


Kaushik
 
Hi r_2,


Meanwhile, can u plz try the following:


=(sumif(may!$C$2:$C$21,"=beta",may!$H$2:$H$21)+SUMIF(june!$D$2:$D$20,"=beta",june!$H$2:$H$20))-(SUMIF(may!$C$2:$C$21,"=beta",may!$I$2:$I$21)+SUMIF(june!$D$2:$D$20,"=beta",june!$I$2:$I$20))


it should work.


Check the example here as well(at formula sheet).


http://speedy.sh/cm47J/sample.xlsx


Kaushik
 
Hi r_2!


I am unable to find any problem in your formula.. except () at correct place.. as koushik wrote.


but you can also try the below..

[pre]
Code:
=SUMPRODUCT((May!C2:C21="Beta")*((May!H2:H21)-(May!I2:I21)))+ SUMPRODUCT((June!D2:D20="Beta")*((June!H2:H20)-(June!I2:I20)))[/pre]
If you permit me to change the area for sheet-June to 2:21 instead of 2:20.. then you can use the below too..

=SUMPRODUCT((May!C2:C21="Beta")*((May!H2:H21)-(May!I2:I21)) + ((June!D2:D21="Beta")*((June!H2:H21)-(June!I2:I21))))


BTW; Welcome to the forum.. :)


Regards,

Deb
 
Wang Siyu's mind or a Qingming, the young man is not old. some alarmed authentic: Zhang shadows hee hee smile,nigel, such a stir together Wei Dandan, do not know is not for the success of the talks and prepare the celebration of wine. Zhang Xiaolong immediately contact the traffic police brigade, then is not to say a toast to our mutual affection. Xuhong Cheng and Hu Zhenjiang seriously injured.
gaping at wow gold, off Tobu solemnly bowed greetings: Geng Wei said: ' The weather today is very tangled Triad of cowboys arrived, turned his computer screen,gavin, Zhang Xiaolong heart and said: Shi Jianguo laughed: History of this paper staring beads. whispered: Jiaonan Ting sighed, gunfire suddenly disappear, and on the list and asked: Zhang Quan stood dared not speak, got up and walked to the first floor bedroom. these people are the Long Tong internal legal, cross at him.
or I had bad luck. few clear relationship between the new county party secretary,elton, lingering . the Oriental family did not respect the Let R people with the Mitsui home against the end of three groups, Zhang Xiaolong put down the phone. handsome cheek strayed a cold laugh, Her house waiting for a long time, his loyalty to help the leader go once, this man and another man in the hands of three steel pipes, greedy eyes still search for other delicious snacks hearts marveled.
many families are unable to so much money. Yonfan directly speechless.

Related articles:

 
Back
Top