+ Reply to Thread
Results 1 to 13 of 13

Increase range automatically within formula

  1. #1
    Forum Contributor
    Join Date
    11-30-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    112

    Increase range automatically within formula

    Hi,

    I have the following formula but have to keep extending the range each time I update the dataset, Is there any way I can adjust the formula to go to the last entry. In this case row 2321?
    Attached Files Attached Files

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Increase range automatically within formula

    If you use a Table for your data, the ranges will automatically expand when you use table references.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Forum Contributor
    Join Date
    11-30-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    112

    Re: Increase range automatically within formula

    I'm importing it from SQL so nit sure it will retain table name when imported?

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Increase range automatically within formula

    If you are querying SQL server, it should come through as a table anyway.

  5. #5
    Forum Contributor
    Join Date
    11-30-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    112

    Re: Increase range automatically within formula

    Hi, It's a spreadsheet I've inherited. I just click the button and the data's imported into the sheet. I just tried creating the table but when I reimport it loses the table refrence

  6. #6
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Increase range automatically within formula

    What's the code to do the import?

  7. #7
    Forum Contributor
    Join Date
    11-30-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    112

    Re: Increase range automatically within formula

    Please Login or Register  to view this content.

  8. #8
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Increase range automatically within formula

    Is there already a table on the worksheet when you run that code?

  9. #9
    Forum Contributor
    Join Date
    11-30-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    112

    Re: Increase range automatically within formula

    Hi, yes there's already a table

  10. #10
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Increase range automatically within formula

    Try replacing this line in each routine
    Please Login or Register  to view this content.
    with this
    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    11-30-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    112

    Re: Increase range automatically within formula

    just getting a run time error with the code changes.

  12. #12
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Increase range automatically within formula

    What error?

  13. #13
    Forum Contributor
    Join Date
    11-30-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    112

    Re: Increase range automatically within formula

    Hi,

    Run-time error '9':
    Subscript out of range

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. range and if formula to detect a % increase in a timeframe
    By Ebru in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-03-2016, 05:56 PM
  2. Replies: 10
    Last Post: 09-26-2015, 04:19 PM
  3. [SOLVED] Need 'criteria' within AVERAGEIFS formula to automatically increase when dragging down
    By javboy800 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-07-2014, 10:49 AM
  4. [SOLVED] Formula to automatically increase invoice number
    By blacktie in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-19-2013, 08:49 AM
  5. [SOLVED] How to make formula automatically increase by one?
    By Tommy1005 in forum Excel General
    Replies: 6
    Last Post: 10-22-2012, 09:45 PM
  6. Automatically increase value
    By Jazzy Max in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-21-2009, 06:13 PM
  7. Replies: 1
    Last Post: 03-15-2009, 05:38 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1