dcsimg
Results 1 to 4 of 4

Thread: Excel: Dynamic Named Range for Row

  1. #1

    Thread Starter
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,089

    Excel: Dynamic Named Range for Row

    I currently have the following named range formula

    =Sheet1!$L$5:$N$5

    which is for a row and it works just fine fine there are just 3 values, starting in the row at cell L5 to cell N5, but what if I add a new value in O5? I know how to create a dynamic range for a column, but how is it done for the cells in a row starting at L5?

  2. #2
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    1,871

    Re: Excel: Dynamic Named Range for Row

    One System to rule them all, One IDE to find them,
    One Code to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    For health reasons i try to avoid reading unformatted Code

  3. #3
    PowerPoster
    Join Date
    Dec 2004
    Posts
    24,450

    Re: Excel: Dynamic Named Range for Row

    if you want to automate it when an additional value is added to a row, you could use the worksheet change event to test if there is a named range for that row them extend the named range to include the changed cell
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  4. #4

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width