Use TEXT to extract the TRUE SUMIFS range from a multiple SUMIFS cell

Silverjman

Board Regular
Joined
Mar 19, 2014
Messages
110
I have the following formula.

Code:
=IF(N$2>ActualsEndDate, IF(ReturnsBasis="Cashflow",SUMIFS(Units!YL$10:YL$320,Units!YL$10:YL$320,">"&0,Units!$C$10:$C$320,$C78), IF(ReturnsBasis="Income",SUMIFS(Units!DBN$10:DBN$320,Units!DBN$10:DBN$320,">"&0,Units!$C$10:$C$320,$C78),0)),    SUMIFS(Assets!BI$10:BI$60,Assets!$C$10:$C$60,$C78))

I am desperate to create a doubleclick drilldown in vba, BUT I thought as a first, VERY crude, step I would rip the correct range out of the formula and display in as text in a cell via a formula.

To which end I thought I would append TEXT to each option in a seperate but mirroring cell.


Code:
=IF(N$2>ActualsEndDate, IF(ReturnsBasis="Cashflow",TEXT(SUMIFS(Units!YL$10:YL$320,Units!YL$10:YL$320,">"&0,Units!$C$10:$C$320,$C78),????), IF(ReturnsBasis="Income",TEXT(SUMIFS(Units!DBN$10:DBN$320,Units!DBN$10:DBN$320,">"&0,Units!$C$10:$C$320,$C78),????),0)),    TEXT(SUMIFS(Assets!BI$10:BI$60,Assets!$C$10:$C$60,$C78),????))

=IF(N$2>ActualsEndDate, IF(ReturnsBasis="Cashflow",,TEXT(SUMIFS(Units!YL$10:YL$320,Units!YL$10:YL$320,">"&0,Units!$C$10:$C$320,$C78),????), IF(ReturnsBasis="Income",,TEXT(SUMIFS(Units!DBN$10:DBN$320,Units!DBN$10:DBN$320,">"&0,Units!$C$10:$C$320,$C78),,????),0)), ,TEXT(SUMIFS(Assets!BI$10:BI$60,Assets!$C$10:$C$60,$C78),,????))[/

BUT I am clueless as to what to put in for the format "????", am I asking TEXT to do something it can't do? Tried to find a "general" or "text" format code.

THANKS for reading!

p.s. once I had the correct SUMIFS I would propose to use MID/LEFT to extract the sum range and then use indirect to INDEXMATCH to jump to the first appearence of the ID's in the appropriate sum range.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,223,237
Messages
6,170,930
Members
452,367
Latest member
TePunaBloke

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