Results 1 to 5 of 5

Toggle Button To Fill In Blank Cells With N/A

Threaded View

  1. #1
    Forum Contributor
    Join Date
    01-12-2012
    Location
    UK
    MS-Off Ver
    Excel 2016
    Posts
    104

    Toggle Button To Fill In Blank Cells With N/A

    Hello,

    I have the attached spreadsheet where I need to fill in any blank cells with "N/A".
    The range is quite large, so with the current code, it takes a long time to run.

    Is there any way to make this more efficient?:

    Private Sub Toggle_NA_Click()
    
    Dim TestResults As Range, c5 As Range
    Set TestResults = Range("A3:X63")
    
    Application.EnableEvents = False
    Application.ScreenUpdating = False
    
    If Toggle_NA.Value = True Then
        For Each c5 In TestResults
            If c5.Value = "" Then c5.Value = "N/A"
        Next c5
    Else
        For Each c5 In TestResults
            If c5.Value = "N/A" Then c5.Value = ""
        Next c5
    End If
    
    Application.EnableEvents = True
    Application.ScreenUpdating = True
    
    End Sub
    Many Thanks!
    Storm08
    Attached Files Attached Files
    Last edited by Storm08; 12-02-2022 at 12:34 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Button to Toggle Text between two cells
    By SportsAnnouncing in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-01-2020, 11:07 AM
  2. [SOLVED] Toggle Button to hide/unhide blank rows
    By therealaccountant in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-05-2019, 07:56 PM
  3. [SOLVED] how do i make a toggle button change other toggle buttons value to false
    By kevinu in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-10-2018, 04:19 PM
  4. [SOLVED] Toggle Button to filter empty cells or cells with values
    By goomblar in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-05-2014, 10:31 AM
  5. Toggle Button Does not Toggle OFF when Clicked
    By robbfamily in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-19-2014, 05:12 PM
  6. [SOLVED] Toggle fill Color in cell based on condition of cell--blank or text added.
    By moosetales in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-15-2014, 08:39 PM
  7. Replies: 1
    Last Post: 02-13-2014, 10: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