Global Excel Summit的动态

查看Global Excel Summit的组织主页

15,237 位关注者

It's now possible to trim ranges and references, thanks to a new Excel?update for Microsoft 365 Insiders on the Beta Channel.? ? The TRIMRANGE function?removes the excess from a result — either the leading empty rows (at the top), the trailing empty rows (at the bottom), or both.? ? By doing so, you can keep everything tidy and potentially benefit from increased performance.? ? In the video example, a list of names are present in A2:A11. Adjacent to this, a formula is constructed that concatenates each name to '@email.com':? ? =LOWER(A2:A11&"@email.com") e.g. [email protected], [email protected], [email protected] ? This works fine, but if you wanted to futureproof the reference to reflect the fact that more names will be added, extending it now to?A2:A21?means you can avoid doing it later on.? ? However, the problem with this is the '@email.com' repeats itself for as many empty cells as there are.? ? The solution is to wrap the reference in TRIMRANGE so the?unnecessary?values do not appear in the final result:? ? =LOWER(TRIMRANGE(A2:A21)&"@email.com")? ? By default, TRIMRANGE cuts off leading and trailing empty rows. However, its optional arguments [row_trim_mode] and [col_trim_mode] allow you to be specific about this.? ? Alternatively, instead of TRIMRANGE, use the new range operator for a more succinct way to trim references:? ? ? Full trim ref (.:.)? ? Leading trim ref (.:)? ? Trailing trim ref (:.)? ? For example,?=LOWER(A2.:.A21&"@email.com") does the same as what TRIMRANGE defaults to.? ? Although official Excel tables are often the best way to store data, they do have certain limitations, such as not being compatible with dynamic arrays. Therefore, this new function and operator gives us greater flexibility we can tap into. It'll be interesting to see how they’re used going forward. ?--- By Andrew Moss. ? #exceleration #excel #globalexcelsummit

Gary Knott FCA BSc ??

Better data, better decisions, better results | User-friendly models and analyses I 100s of successful projects I Big 4 experience I Chartered Accountant I Excel book author

5 个月

Great, useful to keep up-to-date with the latest DA function!

Dennis Johns, CPA

The Excel Wizard

5 个月

Cool new function and great example!

查看更多评论

要查看或添加评论,请登录