VBA to notify the user if there are blank rows between rows

  • I'm thinking VBA would be the best way to solve this. I would like a message window to appear and let the user know at row 97 is blank. I want to know which rows are blank between rows with data only.

  • Sorry if I wasn't being clear. I have a macro that puts a "$" at the end of a row if there is data in any of the columns in the row. This Excel file gets saved as a CSV, comma delimited file. When the mainframe reads this CSV file, the "$" tells it to keep reading and go to the next line.


    What I'd like to do is have a window/message come up to tell me if there are blank row(s) between rows with data. If I upload this CSV file that has 200 rows with data and one blank row between another 200 rows, the mainframe will only read the first 200 rows. If you would still like an example I would be more than happy to provide one. Thanks.

  • You could try this, and change your range selection of entire worksheet, however with this one the entire row would need to be blank and all other rows would need to have data completely across. I would be happy to tweak it for you according to the data that you pull in.


    Dim c As Range
    Range("B1:C10").Select
    For Each c In Selection
    If c.Value = "" Then
    If (MsgBox("Blank Row Detected at " & c.Address & ", Remove?", vbYesNo, "Blank Row") = vbYes) Then
    c.EntireRow.Delete
    End If
    End If
    Next


    Bruce

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!