Good Day,
Require assistance in trimming the below code + borders to be included for the range that consist text.
Code
Sub Update_Data()
Dim iRange As Range
Dim iCells As Range
Application.ScreenUpdating = False
Sheets("Input").Select
Range("B3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Output").Select
Range("B4").Select
Selection.PasteSpecial Paste:=xlPasteValues
Sheets("Input").Select
Range("C3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Output").Select
Range("D4").Select
Selection.PasteSpecial Paste:=xlPasteValues
Sheets("Input").Select
Range("D3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Output").Select
Range("J4").Select
Selection.PasteSpecial Paste:=xlPasteValues
Sheets("Input").Select
Range("E3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Output").Select
Range("K4").Select
Selection.PasteSpecial Paste:=xlPasteValues
Sheets("Input").Select
Range("F3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Output").Select
Range("L4").Select
Selection.PasteSpecial Paste:=xlPasteValues
Sheets("Input").Select
Range("N3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Output").Select
Range("G4").Select
Selection.PasteSpecial Paste:=xlPasteValues
Sheets("Input").Select
Range("O3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Output").Select
Range("F4").Select
Selection.PasteSpecial Paste:=xlPasteValues
Sheets("Input").Select
Range("H3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Output").Select
Range("M4").Select
Selection.PasteSpecial Paste:=xlPasteValues
Sheets("Input").Select
Range("I3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Output").Select
Range("N4").Select
Selection.PasteSpecial Paste:=xlPasteValues
Set iRange = ThisWorkbook.ActiveSheet.UsedRange
For Each iCells In iRange
If Not IsEmpty(iCells) Then
iCells.BorderAround _
LineStyle:=xlContinuous, _
Weight:=xlThin
End If
Next iCells
End Sub
Display More
Please help to trim the code - Anna