Excel Help with Macro

[Closed]
Report
Posts
3
Registration date
Friday November 21, 2014
Status
Member
Last seen
November 21, 2014
-
 Blocked Profile -
I have an excel workbook with 4 Sheets.
Sheet 1 (summary) is a ledger.
Sheet 2 = Bob
Sheet 3 = Bill
Sheet 4 = Bart

Column D in the ledger contains a name (bob, bill or Bart).

This is what i am trying to accomplish.

If the name in Sheet 1 Column D = Bill, copy that row to the sheet named Bill. (starting on row 4 and continuing downward)
If the name in Sheet 1 Column D = Bob, copy that row to the sheet named Bob (starting on row 4 and continuing downward)
If the Name in Sheet 1 Coumn D = Bart, copy that row to the sheet named Bart (starting on row 4 and continuing downward)

I am very new to this, so any help you can provide would be wonderful!

3 replies


What a wonderful question. Here is what I see as the stopping point for design of solution: when is this supposed to happen? Push of a button?

"If you can't soar with the eagles, then don't fly with the flock!" - Oliver Sykes; Bring Me The Horizon
Posts
3
Registration date
Friday November 21, 2014
Status
Member
Last seen
November 21, 2014

Each time I key a new line in the ledger it should automatically xfer to the Name tab depending on what is keyed in Column D.

Thanks!
Blocked Profile
That is really hard to trap. In other words, what do you consider keying in a new line? I would suggest that you press a key combinition after all of the info is entered, then it evaluates the column.
Posts
3
Registration date
Friday November 21, 2014
Status
Member
Last seen
November 21, 2014
> Blocked Profile
Ok, so, my ledger is set up like a table. When I'm in the last row of the table, and i press Tab, it creates a new line in the table.

So what you are suggesting is after i key the new row, i would press a "key combo" to run a macro? And that would xfer the row data to the corresponding Sheet?

Sorry if i sound extremely stupid, I'm trying to teach myself how to do this! Thank you for your help!
Blocked Profile >
Posts
3
Registration date
Friday November 21, 2014
Status
Member
Last seen
November 21, 2014

"i would press a "key combo" to run a macro?"

Yes, that would be the easiest solution to start with. The all you have to do is check what column you are on, and select the D cell in that column. Then once you get that variable from that cell, if then logic to place into a tab. It may not get put together in a day, but try to start with recording a macro of selecting a cell, then reverse engineer the code see what you can make dynamic! Let me know what you get started with, I will help when I can (in between my own work and such)! Lets have fun!

By the way, how is the weather up there? Sunny and 70 here in beautiful Florida! :)
Posts
2818
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
October 18, 2021
486
Hiya,

Not wanting to intrude, but here is how I would handle it.

Create a drop down list for column D.
Enter the data for a row and as a last action, pick the name from the drop down list.
Then use a Worksheet_Change code to copy that row to the appropriate sheet.

Best regards,
Trowa
Blocked Profile
Always glad to hear other solutions. It sounds like a viable solution with a drop down.