Copy to different worksheets on next row

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I’m kind of new to VBA. What little code I do know is just enough to be
dangerous when I try doing something I don’t understand, so any help you
could provide would be greatly appreciated.

The short description of what I am trying to do is with Excel 2003
automatically copy data from one worksheet to the next empty row on one of
the other worksheets depending on the type of information. Here’s the
detailed description:
I have 4 different worksheets in the same workbook: Screening, Guided,
Toolkit, and Control. The Screening worksheet is where all of the data is
initially entered. I am trying to get the information in Screening cells
A2:D2 to copy to cells A2:D2 of the corresponding worksheets depending on if
the data typed into Screening cell K2 is “guidedâ€, “toolkitâ€, or “controlâ€.
This would be done for multiple rows of information entered into the
Screening worksheet so I am also trying to get the data to simply fill into
the next empty row on the correct worksheet.

Thanks in advance.
 
With Worksheets("Screening")
iLastRow = Worksheets(.Range("K2").Value).Cells(Rows.Count,
"A").End(xlUp).Row
.Range("A2:D2").Copy Worksheets(.Range("K2").Value).Cells(iLastRow +
1, "A")
End With

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 

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

Back
Top