View Single Post
 
Old 11-10-2022, 10:17 AM
ArviLaanemets ArviLaanemets is offline Windows 8 Office 2016
Expert
 
Join Date: May 2017
Posts: 949
ArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant future
Default

Make the formula shorter!

In Excel, 8192 is maximum number of characters the formula can be composed of (google for "Excel specifications and limits" for more info).

Ways to get shorter formulas:
1. Try to avoid using spaces in your formula whenever it's possible;
2. Use defined Tables, and Table formula syntax, with keeping Table and column names as short as possible (e.g. you can get the formula in format like =SUM(tbl1.[fld1]) much shorter as the same formula in format =SUM(Sheetname!$AAA$2:$AAA$9999);
3. Use helper columns to get intermediate results for your formula, and refer to them further instead writing the whole formula into single cell;
4. Use [dynamic] names as intermediate sources for your formula.

Having a good night of sleep, I can continue...
5. Use better design of your workbook. Usually having such long formulas is a sure indicator of poor design! Mostly this is caused by entries of same type divided between many worksheets, or many columns. E.g. you have an Excel app where you enter purchase info. Often users design this exactly in same way, like someone in year 1700+ in some paper notebook, e.g. separate columns for different purchased articles in same table, or separate tables (i.e. data on separate sheets in your excel) for different suppliers, or for purchases in different months, etc. This means you get very long and unhandly formulas whenewer there will be need to calculate any totals. An additional downside is, you have to redesign your workbook, whenever a new month is starting, or when a new supplier must be added, etc. When you keep all this info in single table, a single column for every type of data, all such calculations are reduced to using simple SUM(), COUNT(), SUMIFS() and COUNTIFS() formulas. And in case you really need to visually present e.g. data for single supplier, or single month, or single year, you create report sheets (a single report sheet for certain conditions set, e.g. a single Monthly report), where you select report conditions, and report table reads info matching those conditions from data entry table. With such design, you can use your workbook for years without any need for any redesign!

Last edited by ArviLaanemets; 11-11-2022 at 12:47 AM.
Reply With Quote