Macro to copy and paste to another sheet, based on if-then-else

A

ABlevins

I need to edit an existing macro to copy and paste data from a master sheet
to one of two subsequent sheets, based on the value in a specific column (25
and lower values into cell A7 of one sheet and 26 and over into A7 of the
other). I need for the entire row of data to be copied. Any ideas?

Sub MoveA*****()
'
' MoveA***** Macro
' Copies A***** to "ALL A*****" sheet.
'

'
Selection.AutoFilter Field:=7, Criteria1:="**4**"
Range("A11").Select
Range(Selection, Selection.End(xlDown)).Select
Range("A11:J767").Select
Selection.Copy
ActiveSheet.Previous.Select
Range("A1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("K1").Select
Sheets("base").Select
ActiveWindow.LargeScroll Down:=-4
Selection.AutoFilter Field:=7, Criteria1:="**5**"
Range("G12").Select
Range(Selection, Selection.End(xlDown)).Select
Range("G12:J768").Select
Selection.Copy
ActiveSheet.Previous.Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.End(xlToRight).Select
Selection.End(xlToRight).Select
Range("O1").Select
ActiveSheet.Next.Select
Selection.End(xlUp).Select
Selection.AutoFilter Field:=7
Selection.AutoFilter Field:=11, Criteria1:="9.5"

(f-Then-Else statement here)

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top