Olly - that works great, but only if there are blank rows to find. - how do you change it so that it doesnt crash if there are NO blank cells?
Nathansav - I get a syntax error on the line
![]()
s=s& c.row & ","
Olly - that works great, but only if there are blank rows to find. - how do you change it so that it doesnt crash if there are NO blank cells?
Nathansav - I get a syntax error on the line
![]()
s=s& c.row & ","
Adding a bit of error handling:
Also tweaked to return just the rows, not the full cell addresses.![]()
Sub foo() Dim r As Range On Error GoTo NoBlanks Set r = Range("B18:B" & Range("B191").End(xlUp).Row).SpecialCells(xlCellTypeBlanks) MsgBox "Blank cells in " & Replace(r.Address(False, False), "B", ""), vbInformation + vbOKOnly, "Blanks" Exit Sub NoBlanks: MsgBox "No blank cells found", vbInformation + vbOKOnly, "Blanks" End Sub
let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source
If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE
Walking the tightrope between genius and eejit...
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks