T
tracks via OfficeKB.com
i am going to explain what i am trying to do,so things will hopefully be more
understandable.
i have a workbook with 4 worksheets, ie, Daily Production,Daily Crane Info,
Crane Wt Summary,
Calender Summary. production is entered into Daily Production and copied to
Daily Crane Info. The information is manipulated and generates information
that is placed in the range AA15:AF15.
I need to copy the date in cell I7 and the information in AA15:AF15 to Crane
Wt Summary starting at A7to E7and that information for each production date
is tabulated ,. when the daily production is for a new month the information
in Crane Wt Summary pasted to Calender Summary and Crane Wt Summary is
cleared and new month enteries fill into appropriate place. the following is
the code i have so far , much of due to the good people on this website. ALL
help greatly appreciated
Sub CO()
Dim rng1 As Range
Dim rng2 As Range
Dim rng3 As Range
Set rng1 = Worksheets("DAILY CRANE INFO").Range("I7")
With Worksheets("CRANE WT SUMMARY")
Set LASTROW2 = .Cells(Rows.Count, 1).End(xlUp)
Set LASTROW3 = .Cells(Rows.Count, 7).End(xlUp)
Set rng2 = Worksheets("CRANE WT SUMMARY").Range("LASTROW2")
Set rng3 = Worksheets("CRANE WT SUMMARY").Range("A3:LASTROW3")
End With
If Month(rng1) > Month(rng2) Then
Range("rng3").Copy _
Worksheets("CALENDER SUMMARY").Range("A1:E31").Offset(X, Y)
( i require the information for the months to be stored in Calender
Summary in a 4 month across
3 months down array)
Worksheets("CRANE WT SUMMARY").Range("A7:G31").Select
Application.CutCopyMode = False
Selection.ClearContents
Else: Call Sheet2.test
End If
End Sub
Sub test()
Dim DestCell As Range
With Worksheets("crane wt summary")
Set DestCell = .Cells(.Rows.Count, 1).End(xlUp).Offset(1, 0)
End With
With Worksheets("daily crane info")
.Range("I7").Copy
DestCell.PasteSpecial Paste:=xlPasteValues
.Range("AA15:AF15").Copy
DestCell.Offset(0, 1).PasteSpecial Paste:=xlPasteValues
End With
With Worksheets("DAILY PRODUCTION")
.Range("C944").Select
Application.CutCopyMode = False
Section.ClearContents
.Range("F9:G44").Select
Application.CutCopyMode = False
Selection.ClearContents
End With
End Sub
Rick Mason
understandable.
i have a workbook with 4 worksheets, ie, Daily Production,Daily Crane Info,
Crane Wt Summary,
Calender Summary. production is entered into Daily Production and copied to
Daily Crane Info. The information is manipulated and generates information
that is placed in the range AA15:AF15.
I need to copy the date in cell I7 and the information in AA15:AF15 to Crane
Wt Summary starting at A7to E7and that information for each production date
is tabulated ,. when the daily production is for a new month the information
in Crane Wt Summary pasted to Calender Summary and Crane Wt Summary is
cleared and new month enteries fill into appropriate place. the following is
the code i have so far , much of due to the good people on this website. ALL
help greatly appreciated
Sub CO()
Dim rng1 As Range
Dim rng2 As Range
Dim rng3 As Range
Set rng1 = Worksheets("DAILY CRANE INFO").Range("I7")
With Worksheets("CRANE WT SUMMARY")
Set LASTROW2 = .Cells(Rows.Count, 1).End(xlUp)
Set LASTROW3 = .Cells(Rows.Count, 7).End(xlUp)
Set rng2 = Worksheets("CRANE WT SUMMARY").Range("LASTROW2")
Set rng3 = Worksheets("CRANE WT SUMMARY").Range("A3:LASTROW3")
End With
If Month(rng1) > Month(rng2) Then
Range("rng3").Copy _
Worksheets("CALENDER SUMMARY").Range("A1:E31").Offset(X, Y)
( i require the information for the months to be stored in Calender
Summary in a 4 month across
3 months down array)
Worksheets("CRANE WT SUMMARY").Range("A7:G31").Select
Application.CutCopyMode = False
Selection.ClearContents
Else: Call Sheet2.test
End If
End Sub
Sub test()
Dim DestCell As Range
With Worksheets("crane wt summary")
Set DestCell = .Cells(.Rows.Count, 1).End(xlUp).Offset(1, 0)
End With
With Worksheets("daily crane info")
.Range("I7").Copy
DestCell.PasteSpecial Paste:=xlPasteValues
.Range("AA15:AF15").Copy
DestCell.Offset(0, 1).PasteSpecial Paste:=xlPasteValues
End With
With Worksheets("DAILY PRODUCTION")
.Range("C944").Select
Application.CutCopyMode = False
Section.ClearContents
.Range("F9:G44").Select
Application.CutCopyMode = False
Selection.ClearContents
End With
End Sub
Rick Mason