Adding data validation to existing table - not replcating on adding new row

henryg

Board Regular
Joined
Oct 23, 2008
Messages
150
Office Version
  1. 365
Platform
  1. Windows
I am having problems adding data validation to an existing transaction table (some 200+ rows), as the custom formula validation does not get replicated when a new line is added. In this case it is to give a warning if the transaction date is not +/-30 days from the current date (=AND(A222>(TODAY()-30),A222<(TODAY()+30)).

I created a new (empty) table with the same data validation and it replicated when a new row was added.

Can anyone suggest what might be going wrong? I do not want to start from scratch, even allowing that I could paste the data across, as it is linked to a number of other sheets and tables, and shared. Something would be bound to go wrong!
 
Last edited:

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Hi Henryg,

I'm not sure I understand but let me give it a try. A Data Validation Custom formula should use the cell address which is the first row being checked and the Data Validation should be applied to all cells where required, even if they do not yet contain data.

For this example I selected cells B2:C2000, Data Validation, Custom with a Formula of
=AND($A2>(TODAY()-30),$A2<(TODAY()+30))
and for Error Alert I selected Warning.

Column B or C changes for rows 5,6 and 7 are allowed, others give warning if column A has a date.

ABC
NameNumber
Bert
Fred
Sue
Fred
Sue
Sara
Bert
Fred

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: center"]Transaction Date[/TD]

[TD="align: center"]2[/TD]
[TD="align: center"]07-Jul-19[/TD]

[TD="align: right"]3[/TD]

[TD="align: center"]3[/TD]
[TD="align: center"]17-Jul-19[/TD]

[TD="align: right"]6[/TD]

[TD="align: center"]4[/TD]
[TD="align: center"]27-Jul-19[/TD]

[TD="align: right"]5[/TD]

[TD="align: center"]5[/TD]
[TD="align: center"]05-Sep-19[/TD]

[TD="align: right"]3[/TD]

[TD="align: center"]6[/TD]
[TD="align: center"]15-Sep-19[/TD]

[TD="align: right"]1[/TD]

[TD="align: center"]7[/TD]
[TD="align: center"]25-Sep-19[/TD]

[TD="align: right"]3[/TD]

[TD="align: center"]8[/TD]
[TD="align: center"]05-Oct-19[/TD]

[TD="align: right"]1[/TD]

[TD="align: center"]9[/TD]
[TD="align: center"]15-Oct-19[/TD]

[TD="align: right"]1[/TD]

[TD="align: center"]10[/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]11[/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]12[/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

</tbody>
Sheet2
 
Upvote 0
Thanks for your help Toadstool! When I tried to enter the validation formula for the whole column I found I already had different data validation set that I had forgotten; Excel allowed me to change the validation in the last cell but subsequent rows then had no validation, presumably because I had confused it.
 
Upvote 0

Forum statistics

Threads
1,223,744
Messages
6,174,254
Members
452,553
Latest member
red83

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