Modifying an Already Written Function

saxophonemaster

New Member
Joined
Sep 8, 2010
Messages
5
I have a function that I have been using in one of my excel spreadsheets and need help on figuring out how to modify it. I'm sure macros would be easier, but I haven't gotten around to learning those yet.

Right now, the formula looks like
=-1*SUMPRODUCT(--('Transaction List'!$B46:$B595>="5/22/2011"+0),--('Transaction List'!$B46:$B595<="5/26/2011"+0),--('Transaction List'!$E46:$E595="Transportation"),'Transaction List'!$G46:$G595)

This basically pulls transactions from a different sheet that fall between the two dates and have the certain category.

What I want to add is another condition where it will pull the information if it matches two different account names.

If the account names are in say column C, and I just wanted to pull it if it matched one account in addition to the previous requirements I know I could do

=-1*SUMPRODUCT(--('Transaction List'!$B46:$B595>="5/22/2011"+0),--('Transaction List'!$B46:$B595<="5/26/2011"+0),--('Transaction List'!$E46:$E595="Transportation")--('Transaction List'!$C46:$C595="Act1"),'Transaction List'!$G46:$G595)

However I haven't figured a way to pull the information that meets all the previous requirements as well as adding a rule that requires that the account be either Act1 OR Act2.

Any idea on how I could modify the function to have the additional rule that the information in Column C either equals Act1 OR Act2?

Thanks!

Travis
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
The safest/easiest way would be to have a SUMPRODUCT-function for both account names and SUM them together.
 
Upvote 0
Try

=-1*SUMPRODUCT(--('Transaction List'!$B46:$B595>="5/22/2011"+0),--('Transaction List'!$B46:$B595<="5/26/2011"+0),--('Transaction List'!$E46:$E595="Transportation"),('Transaction List'!$C46:$C595="Act1")+('Transaction List'!$C46:$C595="Act2"),'Transaction List'!$G46:$G595)
 
Upvote 0

Forum statistics

Threads
1,224,552
Messages
6,179,486
Members
452,917
Latest member
MrsMSalt

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