Hello all,
I've been working on this for some time now and just can't figure it out.
This is what I have so far. Can't seem to find the right routine for a sellection message box or a positive check for a cell with data and move to next selection routine.
I have attached an example of the sheet I am using with Macro1 already run.
Here is my current code that pastes to all four choices.
Sub Macro2()
'
' Macro2 Macro
' Copies Data range from "Calculation" to "Next" in selected line and delets data in "Import"
' Keyboard Shortcut: Ctrl+C
'
'Could use a selection Form or mesagebox with Day 1 through Day 4 buttons here to determine where to paste selected data.
'Or macro would have to determine if target cells are full and move to the next target then stop if target is available and
'paste was successful.
Sheets("Calculation").Select 'Selects the "Calculation" Sheet
Range("C4:I4").Select 'Selects the range to copy
Selection.Copy 'Copies the range
Sheets("Next").Select 'Selects the "Next" Sheet
Range("B18").Select 'Selects the starting cell for paste.
'Need to be able to select the next range if B18 is already full or stop sub if paste ocures below
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False 'Paste Special comand
Range("B13").Select 'Returns Focus to B13
Range("B27").Select 'Selects the starting cell for paste
'Need to be able to select the next range if B27 is already full or stop sub if paste ocures below
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False 'Paste Special comand
Range("B22").Select 'Returns Focus to B22
Range("B36").Select 'Selects the starting cell for paste
'Need to be able to select the next range if B36 is already full or stop sub if paste ocures below
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False 'Paste Special Command
Range("B31").Select 'Returns Focus to B31
Range("B45").Select 'Selects the starting cell for paste
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False 'Paste Special Command
Range("B40").Select 'Returns Focus to B40
'Should be the last available sellection, Need to possibly rename current "Next" sheet and make a new "Next" sheet if B45 is Full
Sheets("Calculation").Select 'Selects "Calculation" Sheet
Range("A1").Select 'Focuses on Cell A1
'Sheets("Import").Select 'Selects "Import" Sheet
'Cells.Select 'Selects all Cells
'Selection.ClearContents 'Erases all data from "Import" sheet to avoid duplication
'Range("A1").Select 'Focuses on cell A1
Sheets("Next").Select 'Returns to "Next" sheet at macro conclusion
End Sub
Thanks
Bookmarks