ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Formula compaction (https://www.excelbanter.com/excel-worksheet-functions/175428-formula-compaction.html)

adimar

Formula compaction
 
Please suggest a more compact format for this formula:
=SUMPRODUCT(
(INDIRECT("RawData!B"&$I$32&":B"&$J$32)=105)*
(INDIRECT("RawData!AA"&$I$32&":AA"&$J$32)="M6")*
(INDIRECT("RawData!AG"&$I$32&":AG"&$J$32)="CLOSED" )*
(INDIRECT("RawData!P"&$I$32&":P"&$J$32)="CLOSED")*
(INDIRECT("RawData!AD"&$I$32&":AD"&$J$32)=Calcula tedData!H2)*
(INDIRECT("RawData!AD"&$I$32&":AD"&$J$32)<=Calcula tedData!H3)*
(INDIRECT("RawData!AF"&$I$32&":AF"&$J$32)INDIRECT ("RawData!AD"&$I$32&":AD"&$J$32))*
((ISNUMBER(MATCH(INDIRECT("RawData!E"&$I$32&":E"&$ J$32),Definitions!$B$3:$B$6,0)))))
)

Also, is there a way to alias frequent constructs, like
("RawData!B"&$I$32&":B"&$J$32) and replace with a parametrized syntax, like
€śdata(B)€ť, still using a worksheet formula.

Thank you.


Bernard Liengme

Formula compaction
 
Last part of question:
I used Define Names to define: Somewhere --- Refers to "Sheet3!C"
In a cell on Sheet1 I use =INDIRECT(Somewhere&G1)
This returned the value from C1 in Sheet3
I could have used a shorter name but you must avoid names that could be
mistaken for cell references
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"adimar" wrote in message
...
Please suggest a more compact format for this formula:
=SUMPRODUCT(
(INDIRECT("RawData!B"&$I$32&":B"&$J$32)=105)*
(INDIRECT("RawData!AA"&$I$32&":AA"&$J$32)="M6")*
(INDIRECT("RawData!AG"&$I$32&":AG"&$J$32)="CLOSED" )*
(INDIRECT("RawData!P"&$I$32&":P"&$J$32)="CLOSED")*
(INDIRECT("RawData!AD"&$I$32&":AD"&$J$32)=Calcula tedData!H2)*
(INDIRECT("RawData!AD"&$I$32&":AD"&$J$32)<=Calcula tedData!H3)*
(INDIRECT("RawData!AF"&$I$32&":AF"&$J$32)INDIRECT ("RawData!AD"&$I$32&":AD"&$J$32))*
((ISNUMBER(MATCH(INDIRECT("RawData!E"&$I$32&":E"&$ J$32),Definitions!$B$3:$B$6,0)))))
)

Also, is there a way to alias frequent constructs, like
("RawData!B"&$I$32&":B"&$J$32) and replace with a parametrized syntax,
like
"data(B)", still using a worksheet formula.

Thank you.




Herbert Seidenberg

Formula compaction
 
Here is my suggestion, using defined names:
http://www.freefilehosting.net/download/3bddd

adimar

Formula compaction
 

Some feedback: Having cleaned-up and re-organized my application I must tell
you the advice you gave me in this post made a huge difference in efficiency
and readability.

Please let me know if you have other €śbest practices€ť you can share.

Thank you!


"Herbert Seidenberg" wrote:

Here is my suggestion, using defined names:
http://www.freefilehosting.net/download/3bddd



All times are GMT +1. The time now is 05:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com