Multi-column data validation with Excel tables

Mr. Snrub

Board Regular
Joined
May 22, 2005
Messages
150
Office Version
  1. 365
Platform
  1. Windows
I am creating an Excel workbook to keep track of my paychecks. I have a parent table called EarningsRates that has the following columns:

Earnings Code: Code to determine the description (e.g. os1 = Overtime Shift 1, rs1 = Regular Shift 1, pto = Paid Time Off)
Start Date: Date the new pay rate for a particular earnings code goes into effect (usually January 1 of each year)
End Date: Date the pay rate for a particular earnings code ends (usually December 31 of each year)
Rate: The actual pay rate per hour for a certain pay description in a particular date range.

I also have a child table called EarningsTransactions that stores the actual paycheck transactions:

Earnings Code: Same as EarningsRates table.
Pay Date: Date of the paycheck
Hours: Number of hours worked during the pay period.
Rate: Same as EarningsRates table. Fetches the Rate through a SUMIFS function using Pay Date field.
Amount: Calculated field. Hours column * Rate column.

What I want to do is add some data validation such that:
* You cannot enter in an earnings code and pay date into EarningsTransactions unless there is a corresponding code and date range in EarningsRates.
* You cannot delete a record in the parent table EarningsRates without first deleting the corresponding record(s) in EarningsTransactions

Is this possible?
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Forum statistics

Threads
1,224,910
Messages
6,181,678
Members
453,062
Latest member
blackyblack

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