+ Reply to Thread
Results 1 to 6 of 6

VBA Macros to delete blank

Hybrid View

  1. #1
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    906

    Smile VBA Macros to delete blank

    Hello,

    I am looking for VBA MAcros to clear contents of cells which having a formula with blank output. Every time i have to do this manually which becoming a headache for me every week.

    I have 13 columns and everytime i have to use filter and select the blank cells and right click clear content. This procedure i have to 13 times. Every week the values is changing.

    Cany anyone help me to solve this issue.
    Last edited by hecgroups; 03-01-2012 at 09:45 AM.

  2. #2
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: VBA Macros to delete blank

    Hi select your range and run this
    check this on the copy of your file

    Sub aa()
    Dim c As Range
    For Each c In Selection
        If c.Value = "" Then
        c.ClearContents
        End If
        
        Next
        
    End Sub
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  3. #3
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    906

    Re: VBA Macros to delete blank

    Tom you make my life thanks for our valuable script. IT works.

  4. #4
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    906

    Re: VBA Macros to delete blank

    hai tom thanks for respond but i am afraid that this will not clear the cells which is having values. Can you tell me this will clear the cells which is having zero output formula.

  5. #5
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: VBA Macros to delete blank

    Please tell me: You want to clear the cells which have formula inside but the result of this formula is null string "" or what? Maybe I misunderstood You.

    ok no problem

  6. #6
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    906

    Re: VBA Macros to delete blank

    U understand very well thanks it works for me.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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