J
Jim G
I have the following macro that runsa a UDF to delete blank rows (every other
row). The formula is inserted in cell E11 and copied down for for each line
where Col B is not empty. It works just fine, however, there are only 100+
lines and it runs very slowly. Is there something Ican do to speed it up?
Sub BudgetJobNo()
'
Sheets("Budget").Select
Call RowsJoinData(2) '<where column 2 (B) is blank for every row to delete
Application.DisplayAlerts = False
Application.ScreenUpdating = False
JobNo = "=IF(ISERROR(LEFT(Budget!B11,FIND(""
"",Budget!B11)-1))=FALSE,LEFT(Budget!B11,FIND("" "",Budget!B11)-1),"" "")"
Range("E11").Value = JobNo
'And then copy them down to the last line.
Range("e11:e11").Select
Selection.Copy
CR = 11
Do While Cells(CR, 2) <> ""
Range(Cells(CR, 5), Cells(CR, 5)).Select
ActiveSheet.Paste
CR = CR + 1
Loop
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
row). The formula is inserted in cell E11 and copied down for for each line
where Col B is not empty. It works just fine, however, there are only 100+
lines and it runs very slowly. Is there something Ican do to speed it up?
Sub BudgetJobNo()
'
Sheets("Budget").Select
Call RowsJoinData(2) '<where column 2 (B) is blank for every row to delete
Application.DisplayAlerts = False
Application.ScreenUpdating = False
JobNo = "=IF(ISERROR(LEFT(Budget!B11,FIND(""
"",Budget!B11)-1))=FALSE,LEFT(Budget!B11,FIND("" "",Budget!B11)-1),"" "")"
Range("E11").Value = JobNo
'And then copy them down to the last line.
Range("e11:e11").Select
Selection.Copy
CR = 11
Do While Cells(CR, 2) <> ""
Range(Cells(CR, 5), Cells(CR, 5)).Select
ActiveSheet.Paste
CR = CR + 1
Loop
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub