• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Problems when trying to write this formula =AP6:address(6;counta(AP6:BJ6))|General Excel Questions & Answers|Excel Forum|My Online Training Hub

You are here: Home / Problems when trying to write this formula =AP6:address(6;counta(AP6:BJ6))|General Excel Questions & Answers|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumGeneral Excel Questions & Answe…Problems when trying to write this …
sp_PrintTopic sp_TopicIcon
Problems when trying to write this formula =AP6:address(6;counta(AP6:BJ6))
Avatar
Cristina González
Member
Members
Level 0
Forum Posts: 29
Member Since:
November 16, 2019
sp_UserOfflineSmall Offline
1
September 23, 2021 - 5:41 am
sp_Permalink sp_Print

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.pngImage Enlarger

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

Thanks in advance,

Cristina

sp_PlupAttachments Attachments
  • sp_PlupImage Captura-de-pantalla-2021-09-22-184231.png (168 KB)
Avatar
Velouria
London or thereabouts
Moderator
Members


Trusted Members

Moderators
Level 4
Forum Posts: 613
Member Since:
November 1, 2018
sp_UserOfflineSmall Offline
2
September 23, 2021 - 9:35 pm
sp_Permalink sp_Print

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))

Avatar
Cristina González
Member
Members
Level 0
Forum Posts: 29
Member Since:
November 16, 2019
sp_UserOfflineSmall Offline
3
September 24, 2021 - 2:57 pm
sp_Permalink sp_Print

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

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4443
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
4
September 24, 2021 - 3:50 pm
sp_Permalink sp_Print

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

Avatar
Velouria
London or thereabouts
Moderator
Members


Trusted Members

Moderators
Level 4
Forum Posts: 613
Member Since:
November 1, 2018
sp_UserOfflineSmall Offline
5
September 24, 2021 - 5:22 pm
sp_Permalink sp_Print

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))

Avatar
Cristina González
Member
Members
Level 0
Forum Posts: 29
Member Since:
November 16, 2019
sp_UserOfflineSmall Offline
6
September 25, 2021 - 1:24 am
sp_Permalink sp_Print

Hello Velouria,

It worked now!!!

Thanks so much for your support Smile

Cristina

Avatar
Cristina González
Member
Members
Level 0
Forum Posts: 29
Member Since:
November 16, 2019
sp_UserOfflineSmall Offline
7
September 25, 2021 - 1:26 am
sp_Permalink sp_Print

Hi Mynda,

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

Thanks,

Cristina

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Brian Pham, Chandler Davis
Guest(s) 10
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
drsven
Annie Witbrod
wahab tunde
Cong Le Duc
Faisal Bashir
Ivica Cvetkovski
Blaine Cox
Shankar Srinivasan
riyepa fdgf
Hannah Cave
Forum Stats:
Groups: 3
Forums: 24
Topics: 6205
Posts: 27212

 

Member Stats:
Guest Posters: 49
Members: 31880
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.