Sub code()
Dim i As Integer, n As Integer
For n = 1 To Worksheets.Count
Worksheets(n).Select
For i = 1 To Cells(65536, "A").End(xlUp).Row
For j = 1 To Cells(i, 256).End(xlToLeft).Column
Cells(i, j) = Cells(i, j)
Next
Next
Next
End Sub
Sub code()
Dim i As Integer
Worksheets(Array("sheet1", "sheet2", "sheet3").Select
For i = 1 To Cells(65536, "A").End(xlUp).Row
For j = 1 To Cells(i, 256).End(xlToLeft).Column
Cells(i, j) = Cells(i, j)
Next
Next
End Sub
Sub code()
Dim i As Integer, n As Integer, j As Integer
For n = 1 To Worksheets.Count
If Worksheets(n).Name <> "YOUR NAME HERE" And Worksheets(n).Name <> "2nd Name" Then
Worksheets(n).Select
For i = 1 To Cells(65536, "A").End(xlUp).Row
For j = 1 To Cells(i, 256).End(xlToLeft).Column
Cells(i, j) = Cells(i, j)
Next
Next
End If
Next
End Sub
Sheets("Summary").Select
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Dom_Shipment_Char").Select
Cells.Select
Range("C22").Activate
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Intl_Shipment_Char").Select
Cells.Select
Range("B7").Activate
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Accessorials").Select
Cells.Select
Range("C107").Activate
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Customs, Duty and Tax").Select
Cells.Select
Range("I4").Activate
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
There is another option to get around Copy/Paste Values.
Assuming you want to remove the formulas and just save the values in cell A1, then you can use something like this -
Range("A1") = Range("A1")
This will replace the formula in A1 with the value.
If you want to do this for the whole sheet, try the following code.
- Ardhendu
Open in new window