SOLVED

Data Validation Formula to limit cell input range based on value in another cell

%3CLINGO-SUB%20id%3D%22lingo-sub-2101518%22%20slang%3D%22en-US%22%3EData%20Validation%20Formula%20to%20limit%20cell%20input%20range%20based%20on%20value%20in%20another%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2101518%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20should%20be%20simple%2C%20but%20I%20cannot%20seem%20to%20find%20the%20same%20question%20asked%20before%2C%20and%20all%20solutions%20I%20have%20tried%20have%20failed.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20I%20have%20cell%20A1%20and%20it%20is%20empty%2C%20I%20do%20not%20want%20a%20limit%20to%20the%20value%20that%20can%20be%20inputted%20in%20cell%20B1.%3C%2FP%3E%3CP%3EIf%20the%20text%20%22LIMIT%22%20appears%20in%20cell%20A1%2C%20the%20value%20that%20can%20be%20entered%20into%20cell%20B1%20should%20be%20limited%20to%200-10(for%20example).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20know%20that%20you%20can%20use%20data%20validation%20to%20limit%20a%20cell%20input%20to%20between%20certain%20values%2C%20but%20I%20cannot%20work%20out%20how%20to%20apply%20this%20to%20a%20custom%20formula%20based%20on%20%22LIMIT%22%20appearing%20in%20cell%20A1.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20help%20would%20be%20much%20appreciated.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EChris%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2101518%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor

 

Hi,

 

This should be simple, but I cannot seem to find the same question asked before, and all solutions I have tried have failed.

 

If I have cell A1 and it contains any text (other than "LIMIT"), I do not want a limit to the value that can be input in cell B1.

If the text "LIMIT" appears in cell A1, the value that can be entered into cell B1 should be limited to 0-10(for example).

 

I know that you can use data validation to limit a cell input to between certain values, but I cannot work out how to apply this to a custom formula based on "LIMIT" appearing in cell A1.

 

Any help would be much appreciated.

 

Chris

2 Replies
Best Response confirmed by CSPENNINE (New Contributor)
Solution

@CSPENNINE 

Select cell B1.

On the Data tab of the ribbon, click Data Validation.

Select Custom from the Allow dropdown.

Enter the following in the Formula box:

 

=OR(A1<>"LIMIT",AND(B1>=0,B1<=10))

 

If you wish, enter appropriate messages in the Input Message and Error Alert tabs.

Click OK.

@Hans Vogelaar 

 

Thanks so much. I was trying to use "A1=" instead of "A1<>".

 

Chris