zendog1960
Active Member
- Joined
- Sep 27, 2003
- Messages
- 459
- Office Version
- 2019
- Platform
- Windows
The following code does what I want for two rows but I have ten rows of data so I would like to streamline this down to one block of code that can do this work for all ten lines.
Any help would be appreciated!
<code>
Sub Copyinfo1()
Dim BottleDate As String
BottleDate = Range("AB5").Value
If BottleDate <> "" Then
'Select, copy, and paste Wine Name
Range("AD5").Select
Selection.Copy
Sheets("Finished Wines").Select
Range("B5").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Wines in Production").Select
Application.CutCopyMode = False
'Select, copy, and paste Wine Bottled Date
Sheets("Wines in Production").Select
Range("AB5").Select
Selection.Copy
Sheets("Finished Wines").Select
Range("C5").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
'Select, copy, and paste # of Bottles Made
Sheets("Wines in Production").Select
Range("Z5").Select
Selection.Copy
Sheets("Finished Wines").Select
Range("D5").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
'Select, copy, and paste Alcohol by Volume
Sheets("Wines in Production").Select
Range("Y5").Select
Selection.Copy
Sheets("Finished Wines").Select
Range("E5").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Sheets("Wines in Production").Select
Range("AB2").Select
End If
End Sub
Sub Copyinfo2()
Dim BottleDate As String
BottleDate = Range("AB7").Value
If BottleDate <> "" Then
'Select, copy, and paste Wine Name
Range("AD7").Select
Selection.Copy
Sheets("Finished Wines").Select
Range("B6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Wines in Production").Select
Application.CutCopyMode = False
'Select, copy, and paste Wine Bottled Date
Range("AB7").Select
Selection.Copy
Sheets("Finished Wines").Select
Range("C6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
'Select, copy, and paste # of Bottles Made
Sheets("Wines in Production").Select
Range("Z7").Select
Selection.Copy
Sheets("Finished Wines").Select
Range("D6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
'Select, copy, and paste Alcohol by Volume
Sheets("Wines in Production").Select
Range("Y7").Select
Selection.Copy
Sheets("Finished Wines").Select
Range("E6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Sheets("Wines in Production").Select
Range("AB2").Select
End If
End Sub
</code>
Any help would be appreciated!
<code>
Sub Copyinfo1()
Dim BottleDate As String
BottleDate = Range("AB5").Value
If BottleDate <> "" Then
'Select, copy, and paste Wine Name
Range("AD5").Select
Selection.Copy
Sheets("Finished Wines").Select
Range("B5").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Wines in Production").Select
Application.CutCopyMode = False
'Select, copy, and paste Wine Bottled Date
Sheets("Wines in Production").Select
Range("AB5").Select
Selection.Copy
Sheets("Finished Wines").Select
Range("C5").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
'Select, copy, and paste # of Bottles Made
Sheets("Wines in Production").Select
Range("Z5").Select
Selection.Copy
Sheets("Finished Wines").Select
Range("D5").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
'Select, copy, and paste Alcohol by Volume
Sheets("Wines in Production").Select
Range("Y5").Select
Selection.Copy
Sheets("Finished Wines").Select
Range("E5").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Sheets("Wines in Production").Select
Range("AB2").Select
End If
End Sub
Sub Copyinfo2()
Dim BottleDate As String
BottleDate = Range("AB7").Value
If BottleDate <> "" Then
'Select, copy, and paste Wine Name
Range("AD7").Select
Selection.Copy
Sheets("Finished Wines").Select
Range("B6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Wines in Production").Select
Application.CutCopyMode = False
'Select, copy, and paste Wine Bottled Date
Range("AB7").Select
Selection.Copy
Sheets("Finished Wines").Select
Range("C6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
'Select, copy, and paste # of Bottles Made
Sheets("Wines in Production").Select
Range("Z7").Select
Selection.Copy
Sheets("Finished Wines").Select
Range("D6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
'Select, copy, and paste Alcohol by Volume
Sheets("Wines in Production").Select
Range("Y7").Select
Selection.Copy
Sheets("Finished Wines").Select
Range("E6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Sheets("Wines in Production").Select
Range("AB2").Select
End If
End Sub
</code>