+ Reply to Thread
Results 1 to 4 of 4

Clearing entire row contents if cell is empty in a particular column

  1. #1
    Registered User
    Join Date
    01-30-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    14

    Clearing entire row contents if cell is empty in a particular column

    Hi there,

    Im sure there is a simple macro to do this but I have tried doing it myself without asking for advice and its not working.

    I want to be able to clear the contents of whole rows where cells in column F are empty. Heres my latest attempt that doesnt work (Im sure Im way off)

    Please Login or Register  to view this content.
    Any advice would be great, cheers

  2. #2
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Clearing entire row contents if cell is empty in a particular column

    Hi..

    You mean that you want to delete the entire row if col F is empty... right?

  3. #3
    Registered User
    Join Date
    01-30-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Clearing entire row contents if cell is empty in a particular column

    Hi jraj1106,

    Yeah thats right if a cell is empty in column F then delete the entire row that cell is in, without shifting rows up

    Cheers
    Last edited by sgk18; 03-01-2012 at 02:31 AM.

  4. #4
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Clearing entire row contents if cell is empty in a particular column

    I m back... U can try this code.

    Sub DELETEROW()
    Dim rcnt As Variant

    rcnt = 1

    Do While Range("A" & rcnt).Value <> ""
    If Range("F" & rcnt).Value = "" Then
    Rows(rcnt & ":" & rcnt).Delete
    End If
    rcnt = rcnt + 1
    Loop
    End Sub

    Regards...

+ 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