ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to create a Range with Address() (https://www.excelbanter.com/excel-programming/421485-how-create-range-address.html)

Steve McLeod

How to create a Range with Address()
 
I can use this formula, =INDIRECT(ADDRESS(10,2)), but I haven't figured out
how to specify a range as in =INDIRECT(ADDRESS(10,2) & ":" & ADDRESS(30,6)).
I can put the range address into a cell and then reference the cell with
INDIRECT, but it would be nice to imbed the range address calculation inside
the INDIRECT function and save the step.
--
Pictou

Gary''s Student

How to create a Range with Address()
 
Your initial try is actually correct! It's just a matter of using it the
right way. For example:

=SUM(INDIRECT(ADDRESS(1,2) & ":" & ADDRESS(10,10)))

will work just fine
--
Gary''s Student - gsnu200820


"Steve McLeod" wrote:

I can use this formula, =INDIRECT(ADDRESS(10,2)), but I haven't figured out
how to specify a range as in =INDIRECT(ADDRESS(10,2) & ":" & ADDRESS(30,6)).
I can put the range address into a cell and then reference the cell with
INDIRECT, but it would be nice to imbed the range address calculation inside
the INDIRECT function and save the step.
--
Pictou


Peter T

How to create a Range with Address()
 
The worksheet Address function only handles a single cell.

Are you sure you need that Indirect and Address combination, how about

=OFFSET(A1,10-1,2-1,30-10+1,6-2+1)

Regards,
Peter T

"Steve McLeod" wrote in message
...
I can use this formula, =INDIRECT(ADDRESS(10,2)), but I haven't figured out
how to specify a range as in =INDIRECT(ADDRESS(10,2) & ":" &
ADDRESS(30,6)).
I can put the range address into a cell and then reference the cell with
INDIRECT, but it would be nice to imbed the range address calculation
inside
the INDIRECT function and save the step.
--
Pictou





All times are GMT +1. The time now is 12:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com