I use this on many work sheets and it works well. But i am working on a table and I think it is doing the entire possible range rather than the populated range. How can I modify this so it only works on populated cells?
Sub ProperCase()
awsn = ActiveSheet.Name
ib = InputBox("Count What Row")
Dim LastRow As Integer
With Worksheets(awsn)
LastRow = .Cells(Rows.Count, ib).End(xlUp).Row
.Range("A2:xfd" & LastRow).Value = .Evaluate("INDEX(PROPER(A2:xfd" & LastRow & "),)")
End With
End Sub
Sub ProperCase()
awsn = ActiveSheet.Name
ib = InputBox("Count What Row")
Dim LastRow As Integer
With Worksheets(awsn)
LastRow = .Cells(Rows.Count, ib).End(xlUp).Row
.Range("A2:xfd" & LastRow).Value = .Evaluate("INDEX(PROPER(A2:xfd" & LastRow & "),)")
End With
End Sub