ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy to different worksheets on next row (https://www.excelbanter.com/excel-programming/374848-copy-different-worksheets-next-row.html)

Bob

Copy to different worksheets on next row
 
Hello,

Im kind of new to VBA. What little code I do know is just enough to be
dangerous when I try doing something I dont 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. Heres 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.


Bob Phillips

Copy to different worksheets on next row
 
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)

"Bob" wrote in message
...
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.





All times are GMT +1. The time now is 02:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com