Automatically adding rows to one table based on cell value of another table

eidwog

New Member
Joined
Aug 10, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have 3 tables- Staffinfo (on sheet2), Labour (on sheet1), Extras (on sheet1).

-Data is input into Staffinfo for set of workers

-I would like a row added to Labour when a row has text in Staffinfo
-I want to have information in cells in Staffinfo inserted into Labour. Staffinfo column 1 & 2 to Labour column 1 & 2 respectively, Staffinfo column 8 to Labour column 5.

-If the worker is a FIFO (Staffinfo, Column 7) worker I would like Extras to add a row. (the other option is Local- this is to be ignored in this table)
-I would like Staffinfo Column 1, 15, 16 to then fill Extras column 1, 2, 3 respectively

New to all this stuff and has been fun learning from this forum.
I just can't quite seem to nail this code.
Below is what I am trying to achieve but have it done automatically based on Staffinfo
Cheers for any help.

Staffinfo Table:
Staff_Marcos.xlsm
ABCDEFGHIJKLMNOP
1NameTradePhEmailGradeSubgradeOriginRateSite HoursOnOffHire PeriodQuarantine days Quarantine hoursPOHFlights
2AlexSuperman123456789Superman@DC.comSpecial-FIFO301263121010SYDSYD-MEL-SYD
3JohnBatman5461651Batman@DC.comSpecial-Local301263121010SYDSYD-MEL-SYD
4
Staff Info
Cells with Data Validation
CellAllowCriteria
E2:E3List=Grade
F2:F3List=Subgrade
G2:G3List=Origin


Labour Table:
Staff_Marcos.xlsm
DEFGH
22NameTrade Total Onsite Hrs.Charge Out Rate (K)
23AlexSuperman10030
24JohnBatman10030
Cover Sheet
Cell Formulas
RangeFormula
D23:E24D23='Staff Info'!A2
H23:H24H23='Staff Info'!H2


Extras Table:
Staff_Marcos.xlsm
DEFG
28NamePOHTwo - Way TripTwo - Way Air Fare Cost (K)
29AlexSYDSYD-MEL-SYD1,796.10
Cover Sheet
Cell Formulas
RangeFormula
D29D29='Staff Info'!A2
E29:F29E29='Staff Info'!O2
 

Attachments

  • Labour Table.PNG
    Labour Table.PNG
    4.9 KB · Views: 5
  • Extras Table.PNG
    Extras Table.PNG
    2.9 KB · Views: 4
  • Staffinfo Table.PNG
    Staffinfo Table.PNG
    13.4 KB · Views: 4

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Forum statistics

Threads
1,224,820
Messages
6,181,154
Members
453,021
Latest member
Justyna P

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