If statements within Array formulas

MTBer

Board Regular
Joined
Apr 29, 2004
Messages
207
I'm putting together a crosstab report using an array formula, the formula is as follows

{=SUM(IF($A3&D$2&CC_Choice=HYP&date&CC,Amount))}

This basically produces a cost centre report for the Cost Centre Choice by account code by month.

I now wish to add an extra field of selection, by Business Unit, if a BU is selected a cost centre would not be selected so the CC-Choice field will be blank, and vice versa.

Is it possible to put an If statement into the above formula to determine if the report is by CC or BU.

My best attempt involves having a IF statement that checks if the field is populated and then runs the cc formula or bu formula,on the true false conditions.

thanks for your assistance.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
"This basically produces a cost centre report for the Cost Centre Choice by account code by month"

wouldn't a pivot table be a more natural approach?

anyway, you need to describe you data set up in more detail - a worked example would help, as would a view of the data (you can post up a representative snapshot of your data with the html maker addin available by following the link below this post)
 
Upvote 0

Forum statistics

Threads
1,214,659
Messages
6,120,786
Members
448,992
Latest member
prabhuk279

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