Forum

Notifications
Clear all

Problems when trying to write this formula =AP6:address(6;counta(AP6:BJ6))

7 Posts
3 Users
0 Reactions
77 Views
(@cucharon)
Posts: 29
Trusted Member
Topic starter
 

Hello,

I have an excel file where the data grows horizontally. A chart shows this data and I want the chart to update automatically when more data is added. For that, I wanted to create range in "Name Manager" but before, I tried the formula in a cell.

If I write =ADDRESS(6;COUNTA(6:6)) I get $AZ$6 

So I thought that this could be used in the formula =AP6:address(6;counta(AP6:BJ6)) to find out what comes after ":", but I get the message of the image below.

Captura-de-pantalla-2021-09-22-184231.png

Is there anything I am doing wrong? Is there any other way to create a Range?

Thanks in advance,

Cristina

 
Posted : 23/09/2021 3:41 pm
(@debaser)
Posts: 836
Member Moderator
 

ADDRESS returns text, not a range reference, so you'd need to use INDIRECT:

 

=AP6:INDIRECT(address(6;counta(AP6:BJ6)))

 

or perhaps just:

 

=AP6:INDEX(6:6;counta(6:6))

 
Posted : 24/09/2021 7:35 am
(@cucharon)
Posts: 29
Trusted Member
Topic starter
 

Hello Velouria,

The second option works well because I get the array I want when I write it in a cell. The problem is that when I write this formula in the Name Manager, it changes the row to a complete different one.

I've tried to fix the row but then I get a message telling me that there's a problem with this formula.

=$AP$6:index($6:$6:counta($6:$6)+1))

Does this mean that I can't fix cells or colums in the Name Manager?

Why, once I write and save a Name in the Name Manager, the rows change completely?

 

Thanks in advance,

Cristina

 
Posted : 25/09/2021 12:57 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Cristina,

Not sure why you're using ADDRESS for this. It's best to use INDEX or OFFSET to write dynamic named ranges.

Mynda

 
Posted : 25/09/2021 1:50 am
(@debaser)
Posts: 836
Member Moderator
 

You've used a colon instead of a semicolon in the name definition - it should read:

 

=$AP$6:index($6:$6;counta($6:$6)+1))

 
Posted : 25/09/2021 3:22 am
(@cucharon)
Posts: 29
Trusted Member
Topic starter
 

Hello Velouria,

It worked now!!!

Thanks so much for your support Smile

Cristina

 
Posted : 25/09/2021 11:24 am
(@cucharon)
Posts: 29
Trusted Member
Topic starter
 

Hi Mynda,

Velouria has helped me with this and it is solved now.

Thanks,

Cristina

 
Posted : 25/09/2021 11:26 am
Share: