View Single Post
 
Old 09-25-2018, 11:06 PM
ArviLaanemets ArviLaanemets is offline Windows 8 Office 2016
Expert
 
Join Date: May 2017
Posts: 932
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

[@FieldName] is used in Table formula syntax only - you can't use it outside of defined Table!

When you have numbers in cells A2 and B2 (and column headers in row 1), and you want sum of those numbers, then:
1. Without a Table defined, you can e.g. in cell C2 (i.e. in same row for this example) use formulas
Code:
= $A2 + $B2
or
= SUM($A2,$B2)
or
=SUM($A2:$B2)
2. With a Table defined, you can e.g. in cell C2 (i.e. in same row for this example) use formulas
Code:
=[@ColAName] + [@ColBName]
or
=SUM([@ColAName],[@ColBName])
or
=SUM([[@ColAName]:[@ColBName]])
or
= $A2 + $B2
or
= SUM($A2,$B2)
or
=SUM($A2:$B2)
All those formulas return same result. A difference for defined Table is, that as long you have a single formula in column (no values instead formulas entered, and no different formulas entered), the formula is automatically expanded over this column. And of-course is it much easier to interpret Table formulas - in case you are reasonable with column names.

Named ranges mostly are useful when you need calculations over range.

Of-course you can define also a dynamic named ranges to imitate common Excel formulas behavior, but with current example I don't see any reason for this. An example anyway:
Select any cell in row 2. Define a name eg.
Code:
dnMyRange =Results!$A2:$B2
NB! Be aware, that column reference is absolute, the row reference is not! And you definitely must have a cell in row 2 activated - egal in your table or outside of it!
Now into column sum into cell E2 (or into any cell in row 2, even on different worksheet) enter formula
Code:
=SUM(dnMyRange)
and copy it down!
Reply With Quote