Results 1 to 3 of 3

Multiple Dynamic Named Ranges w/ Blank Cells Auto Update on Resize

Threaded View

  1. #1
    Registered User
    Join Date
    09-23-2019
    Location
    Yorkshire, England
    MS-Off Ver
    2013, 2016, 365
    Posts
    5

    Multiple Dynamic Named Ranges w/ Blank Cells Auto Update on Resize

    Hi all,

    I'm new to the forum and returning to Excel for the first time in approx 15 years. Very rusty w/ basic knowledge.

    I currently have a spreadsheet similar to the very simple example attached. I have VBA code as below that forces text in certain ranges to uppercase.

    Private Sub Worksheet_Change(ByVal Target As Range)
    
    Application.ScreenUpdating = False
    
    If Target.Cells.Count > 1 Or Target.HasFormula Then Exit Sub
    
        On Error Resume Next
        If Not Intersect(Target, Range("D5:H19,J5:N19,P5:T19,V5:Z19")) Is Nothing Then
        Application.EnableEvents = False
        Target = UCase(Target)
        Application.EnableEvents = True
        End If
        On Error GoTo 0
        
    Application.ScreenUpdating = True
    
    End Sub
    However, I would like to have dynamic named ranges so that the code updates when rows/columns are inserted/deleted on the worksheet.

    As this spreadsheet is essentially a template, the ranges will begin with all blank cells and even when filled in will still have some blank cells. I currently have the following two formulas that return the correct first and last cells of a range BUT how do I put them together to specify the range itself? If I try to put a colon between them I get an error.

    See spreadsheet for more explanation.

    CELL("address",OFFSET(Aut_1, 1, 0,))
    CELL("address",OFFSET(Oct_HT,COUNTA($B:$B), -1,))
    Please ask if any more clarification is needed.

    Thank you in advance.
    Attached Files Attached Files
    Last edited by finkbee; 09-24-2019 at 09:17 AM. Reason: Changed Things Up

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Help modify code to auto-fit multiple named ranges
    By onmyway in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-24-2015, 01:06 PM
  2. [SOLVED] Setting up dynamic named ranges in code
    By j_Southern in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-04-2014, 01:03 PM
  3. Replies: 0
    Last Post: 10-15-2012, 07:24 AM
  4. Advanced filter with blank cells / Dynamic named range with blank cells
    By Jason_2112 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-15-2010, 12:06 PM
  5. Assigning dynamic named ranges to listfillrange via macro code
    By Schwizer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-30-2007, 11:44 AM
  6. [SOLVED] Resize Named Ranges Help
    By Ray Batig in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-01-2006, 08:35 AM
  7. Dynamic Named Ranges with Blank Cells
    By andibevan in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-17-2005, 01:48 PM

Tags for this Thread

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