This should be an easy one for most programmers but im having some trouble...

B

Brent

I'm creating a database with information on new clients
(Sheet1)and their representatives and im trying to find a
way to program new entries so that I when I type in the
Representatives initials, excel will copy the row of
information and paste the entire row onto the next blank
line of the corresponding representatives sheet(each
representative also has their own sheet. Can some one
PLEASE help me out with this?
 
B

Bob Flanagan

Brent, there are several ways to solve.

One would be to use the Worksheet_Change event. Right click on the sheet
tab and select view code. Then select Worksheet in the left dropdown and
Worksheet_Change in the right. This will create an empty procedure that is
triggered when you change a cell. You would then have to write code to
check to see if the modified cell is one that should trigger the copy
action.

Another approach is to create a macro in a regular module that displays a
dialog with a listbox which lists the individual sheets. You could then
select the destination sheet and click on the OK to copy the active row.
This would avoid issues like two people having the same initials, or mis
typing initials. It would also allow you to select a range of rows and copy
them versus a row at a time.

Robert Flanagan
Macro Systems
Delaware, U.S. 302-234-9857
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel
 

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