RedOctoberKnight
Board Regular
- Joined
- Nov 16, 2015
- Messages
- 150
- Office Version
- 2016
- Platform
- Windows
Good Morning,
Hoping someone could help me out with the following macro. The data copies and pastes values to another workbook but I want to add a command where it deletes all the blank cells in a specified range on the pasted sheet and shifts them up.
I dont get any errors but it doesn't delete the blanks cells in the range.
Any help would be much appreciated.
Thanks
Hoping someone could help me out with the following macro. The data copies and pastes values to another workbook but I want to add a command where it deletes all the blank cells in a specified range on the pasted sheet and shifts them up.
VBA Code:
Workbooks.Open "H:\mci-sup\Excel\STAFFING\TRUCKSCHEDULESDUALSIDES.XLSM"
Application.Run "'TRUCKSCHEDULESDUALSIDES.XLSM'!COPYSHEETS"
With Workbooks("Truck Schedule Builder.xlsm").Worksheets("SUNDAY")
Workbooks("Truckschedulesdualsides.xlsm").Worksheets(.Range("C1").Text).Range("G5:O39").Value = .Range("AA17:AI51").Value
Range("G5:O39").SpecialCells(xlCellTypeBlanks).Delete shift:=xlUp
End With
I dont get any errors but it doesn't delete the blanks cells in the range.
Any help would be much appreciated.
Thanks