Data validation formula not working when applied to table column

DryBSMT

New Member
Joined
Dec 22, 2018
Messages
4
I have created a formula for use in validation entries in a table column. Both versions below evaluate properly to true/false when entered into a cell outside the table.

Code:
=OR(Calculator[@[Shop/WO]]="SHOP",AND(LEFT(Calculator[@[Shop/WO]],2)="HQ",LEN(Calculator[@[Shop/WO]])-3=5),AND(LEN(Calculator[@[Shop/WO]])=6,LEFT(Calculator[@[Shop/WO]],2)>RIGHT(YEAR(Calculator[@Date]),2)-2))

When I insert this into a custom type validation formula rule and apply it to the column Shop/WO, everything comes back with a validation error.

If I change the table column references to cell references, there are no errors reported even if I deliberately enter wrong data.

Code:
=OR(B5="SHOP",AND(LEFT('Calculator'!B5,2)="HQ",LEN('Calculator'!B5)-3=5),AND(LEN('Calculator'!B5)=6,LEFT('Calculator'!B5,2)>RIGHT(YEAR('Calculator'!A5),2)-2))

Am I doing something wrong or is there another way to accomplish this?
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Well after posting this, I was rethinking the problem and realized that when I was first trying this, I did not have the = sign starting the validation formula. I tried it again and it does work. Not sure hoiw to delete this thread though. Sorry.
 
Upvote 0

Forum statistics

Threads
1,214,829
Messages
6,121,826
Members
449,051
Latest member
excelquestion515

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