+ Reply to Thread
Results 1 to 4 of 4

Named Range formula corruption when deleting information from range

  1. #1
    Forum Contributor
    Join Date
    08-04-2008
    Location
    West Calder, Scotland
    MS-Off Ver
    365
    Posts
    418

    Named Range formula corruption when deleting information from range

    Hi guys

    I am trying to understand Named Ranges and have come up against a propblem I can't understand, when I delete items from the range....

    I have this formula in the named range...

    =OFFSET(Data!$N$9,0,0,COUNTA(Data!$N$9:$N$9999),8)

    I have 2 issues:

    1.When I delete the data in the row for $N$9 it is corrupting the named range... Deleting from row 10 is not...

    =OFFSET(Data!#REF!,0,0,COUNTA(Data!$N$9:$N$9898),8)

    2. When the rows are being deleted the part of the range $N$9999 is changing down..

    Haw can I prevent these happening...

    Much appreciate any help

    Many Thanks

    Jim
    Last edited by JamesT1; 01-28-2019 at 02:00 AM.

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,406

    Re: Named Range formula corruption when deleting information from range

    If column N is text try replacing the COUNTA for the rows count with
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If column N is numeric
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    These match presence of data in the last row ... with the understanding that the remaining data in column N is not returned by formula that returns "" empty strings.
    Dave

  3. #3
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Named Range formula corruption when deleting information from range

    Please try

    =OFFSET(Data!$N$1,8,0,COUNTA(Data!$N:$N)-COUNTA(Data!$N$1:$N$8),8)

    hope that you will not delete N1.

  4. #4
    Forum Contributor
    Join Date
    08-04-2008
    Location
    West Calder, Scotland
    MS-Off Ver
    365
    Posts
    418

    Re: Named Range formula corruption when deleting information from range

    Bo_Ry,

    Your solution works a treat, now I understand where I was going wrong,, many thanks for your help,, much appreciated

    FlameRetired,, many thanks for the information,,, Column 9 is numerical but your second solution didn't stop the corruption, many thanks

    Thanks guys

    Jim

+ 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. Deleting a named range versus deleting a table
    By Mr_Phil in forum Excel General
    Replies: 3
    Last Post: 12-21-2017, 11:06 PM
  2. Deleting cells within a named range within a macro
    By Mr_Natural in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-13-2017, 09:30 PM
  3. Deleting cells within a named range within a macro
    By Mr_Natural in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-13-2017, 09:21 AM
  4. Deleting value from 1st cell effects named range
    By tanvi_kalra in forum Excel General
    Replies: 2
    Last Post: 03-26-2014, 03:22 AM
  5. Deleting rows in between a named range
    By shanecb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-06-2013, 12:15 PM
  6. Adding rows to named range and deleting them
    By Djwill in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-15-2012, 02:56 PM
  7. how do i maintain named range addressing after deleting row?
    By erp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-30-2005, 09:55 PM

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