Hey guys !
I have this VBA code and I need it to paste certain data from one sheet to another whenever it finds a blank cell in coulmn F starting from F12.
The code is running but its working in column A and not F.
Please guide me what to do. Below is the code -
I have this VBA code and I need it to paste certain data from one sheet to another whenever it finds a blank cell in coulmn F starting from F12.
The code is running but its working in column A and not F.
Please guide me what to do. Below is the code -
Code:
Sub ProductList()
Sheets("Data").Select
Range("C5:D48").Select
Selection.Copy
Set myRange = Range("F:F")
Sheets("Sales").Select
If Application.WorksheetFunction.CountA(myRange) = 0 Then
[F12].Select
Else
On Error Resume Next
Columns(1).SpecialCells(xlCellTypeBlanks)(1, 1).Select
If Err <> 0 Then
On Error GoTo 0
[F65536].End(xlUp)(2, 1).Select
End If
On Error GoTo 0
End If
Selection.PasteSpecial Paste:=xlPasteValues
End Sub