VBA Code to copy table data from one table to another based on "complete"

Edg38426

New Member
Joined
Nov 8, 2022
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hello Gurus,

I have two tables in two worksheets within the same workbook. I need to be able to copy the row data from Table 1 onto Table 2 once someone has entered in a completion date into the row in Table 1. (Btw, this will likely never be the last row in the table). Essentially, when one group completes a task, the relevant task details will be automatically entered onto the other group's work list, and vice versa. This will only need to occur if the value in the column "Job Type" is "QC", otherwise the data will not need to be copied over. I don't have any code that I'm using currently, but I understand that this will likely be a Worksheet Change event, which I am already using a different version of to automatically send emails. Please tell me if more information is needed, or if you need a version of my workbook to play with. Thank you in advance!
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
You said:
I have two tables in two worksheets within the same workbook

Do you really mean an Excel table or do you mean Two Worksheets

If so either give me the two Worksheet names or the two Table names.
If it's a Table i need the Table name and the worksheet name
 
Upvote 0
You said:
I have two tables in two worksheets within the same workbook

Do you really mean an Excel table or do you mean Two Worksheets

If so either give me the two Worksheet names or the two Table names.
If it's a Table i need the Table name and the worksheet name
I have actual tables on each worksheet that will need to send data between them. Here is a link to a test version of the workbook (with redactions for privacy).
 
Upvote 0
I have actual tables on each worksheet that will need to send data between them. Here is a link to a test version of the workbook (with redactions for privacy).
I never click on Links.
I have never tried to use a sheet change again script when entering data on an Excel Table
And I'm sure I would need the name of both sheets and The Table names

I can write a script to copy one Tables data into another sheets Table When you double click on a particular cell. But I need to know the Sheet name and table name of each sheet

I need something like this:
Sheet named "Alpha" Table Named "Me"
Sheet named "Bravo" Table Named "You"
 
Upvote 0
I never click on Links.
I have never tried to use a sheet change again script when entering data on an Excel Table
And I'm sure I would need the name of both sheets and The Table names

I can write a script to copy one Tables data into another sheets Table When you double click on a particular cell. But I need to know the Sheet name and table name of each sheet

I need something like this:
Sheet named "Alpha" Table Named "Me"
Sheet named "Bravo" Table Named "You"

I understand the link-aversion! Ok, so the first sheet is titled "Work Orders", and the table there is "tblLedger", the second sheet is "Estimating Orders", and that table is "EPOLedger6". This is a scratch version of an already-live document, so I will rename things as needed on the final version. What I need to happen is when the job type in "tbdLedger" column C is set as "To Estimating QC" and a completion date is entered into "Completed" field (column T), I need the data to transfer over to the table "EPOLedger6" on the "Estimating Orders" worksheet. And eventually vice-versa, but I'm sure I could reverse engineer code to go the other way.
 
Upvote 0
For a sheet change event script to run when a certain cell value is changed I need to know the exact Range
Like when Range("G45").value changes run the script.

As you said this:
when the job type in "tbdLedger" column C is set as "To Estimating QC" and a completion date is entered into "Completed" field (column T),
I do not know exactly where Completed field is
Or do you mean a Range Named "Completed"
 
Upvote 0
I have attached an image for your reference. Hope this clears it up a little.
 

Attachments

  • 1667934570589.png
    1667934570589.png
    45.8 KB · Views: 23
Upvote 0

Forum statistics

Threads
1,214,946
Messages
6,122,401
Members
449,081
Latest member
JAMES KECULAH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top