Re: Setting Last Row

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




Sounds simple but, not working when i change.
Here's the actual formula.
(I have info all the way from column A to HC, and this formula is
stopping wherever the data in column A is stopping).


Sub FillColBlanks_all()


Dim wks As Work***
Dim rng As Range
Dim LastRow As Long


Set wks = Active***


With wks

LastRow = Range("a500:hc500").End(xlUp).Row


Set rng = Nothing
On Error Resume Next
Set rng = .Range("A11:hc" &
LastRow).Cells.SpecialCells(xlCellTypeBlanks)
On Error GoTo 0


If rng Is Nothing Then
MsgBox "No blanks found"
Exit Sub
Else
rng.FormulaR1C1 = "=R[-1]C"
End If


End With


End Sub


thanx

.


Quantcast