PorscheGT2
Programmer
Ok, here's the code:
Application.ScreenUpdating = False
Columns("a:a"
.Select
PurchID = "221"
If TypeName(Cells.Find(PurchID)) <> "Range" Then
MsgBox ("Purchaser ID not found!"
Range("a1"
.Select
Else: Cells.Find(PurchID).Activate
ActiveCell.EntireRow.Select
Selection.Cut
mysel = Selection
Sheets(2).Activate
Columns("a:a"
.Select
ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Activate
Cells.Next.Activate
ActiveCell.EntireRow.Select
ActiveSheet.Paste
End If
What it does is that it finds a record (Purchaser ID) in column A, and if it finds a match, it highlights (selects) the entire row corresponding to that record and moves it to another worksheet. My problem is, how do you determine the next empty cell in column A in the other worksheet and paste the record there? Sorry about the clunky code, I'm just starting and I'm learning these on my own. Thanks for any help you can give.
Application.ScreenUpdating = False
Columns("a:a"
PurchID = "221"
If TypeName(Cells.Find(PurchID)) <> "Range" Then
MsgBox ("Purchaser ID not found!"
Range("a1"
Else: Cells.Find(PurchID).Activate
ActiveCell.EntireRow.Select
Selection.Cut
mysel = Selection
Sheets(2).Activate
Columns("a:a"
ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Activate
Cells.Next.Activate
ActiveCell.EntireRow.Select
ActiveSheet.Paste
End If
What it does is that it finds a record (Purchaser ID) in column A, and if it finds a match, it highlights (selects) the entire row corresponding to that record and moves it to another worksheet. My problem is, how do you determine the next empty cell in column A in the other worksheet and paste the record there? Sorry about the clunky code, I'm just starting and I'm learning these on my own. Thanks for any help you can give.