I am using the macro below and getting this error:
Run-time error '28':
Out of stack space
Is there a solution to this? The macro looks for blank columns from Col 'B' to 'BA' and if the cell is blank it copies the preceding row data into the empty cells beneath it.
Here is the macro:
Option Explicit
Sub Macro1()
Dim lngEndRow As Long
Dim lngMyRow As Long
Application.ScreenUpdating = False
lngEndRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
For lngMyRow = 2 To lngEndRow 'Starts at Row 2. Change the 2 to suit.
If Evaluate("COUNTA(B" & lngMyRow & ":BA" & lngMyRow & ")") = 0 Then 'Looks at Col's B to BA. Change to suit.
Range("B" & lngMyRow & ":BA" & lngMyRow).Value = Range("B" & lngMyRow - 1 & ":BA" & lngMyRow - 1).Value
End If
Next lngMyRow
Application.ScreenUpdating = True
MsgBox "Process is now complete.", vbInformation
End Sub
Bookmarks