Forum Discussion
deschroeder
Nov 15, 2021Copper Contributor
Formulas within a Cell
Looking for a solution to total amounts from a range of cells with or without formulas that produce a net result. Example: Column A (rows of cells depicted below) 1 100.00 2 50.00 (100....
SergeiBaklan
Nov 15, 2021Diamond Contributor
As variant
Anvances:
=LET(
range, A1:A4,
str, SUBSTITUTE( FORMULATEXT(range), "=", "" ),
pos, FIND( "-", str ),
SUM( IFNA( --LEFT( str, pos -1 ), range ) ) )
Payments:
=LET(
range, A1:A4,
str, SUBSTITUTE( FORMULATEXT(range), "=", "" ),
pos, FIND( "-", str ),
-SUM( IFNA( --RIGHT( str, LEN(str) - pos ), 0 ) ) )deschroeder
Nov 16, 2021Copper Contributor
Thank you for your solution.
Can this be accomplished using existing Excel functions without using VBA?
- SergeiBaklanNov 16, 2021Diamond Contributor
That's not VBA, that's existing LET function (microsoft.com) . Availability depends on your Excel version and platform.
- deschroederNov 16, 2021Copper ContributorOK, I see that now, I'm a version behind but will upgrade and put your solution into practice. Thank you!
- SergeiBaklanNov 17, 2021Diamond Contributor
deschroeder , you are welcome