niksirat
niksirat

Reputation: 227

use ADDRESS function to define range in COLUMN

I have to use

=COLUMN($L$1:$CA$1)

as part of my original formula that CA, is the last column for a table named MyTable. Because the last column is always changing (add columns every month), i want to use

=COLUMN($L$1:ADDRESS(1,COLUMNS(MyTable)))

but this is not work. My question is: how can i add last column of a table to a part of specific range?

Upvotes: 0

Views: 1143

Answers (1)

Axel Richter
Axel Richter

Reputation: 61890

ADDRESS returns a string. But the range reference in COLUMN($L$1:...) needs a cell reference after the :. INDEX will return a cell reference.

So try within your formula:

...COLUMN($L$1:INDEX(MyTable,1,COLUMNS(MyTable)))...

Upvotes: 2

Related Questions