Meet
Meet

Reputation: 243

Excel data validation using Excel js

I need help with cell validation. I have the min and max value. I have already stopped users to enter special characters in a cell. However, in testing I found that users can enter % in a cell and excel is not prompting the user for the invalid character.

I am using Excel.js which creates templates. In data validation, I have selected custom and my formula is =AND(M4>=0,M4<=100).

How can I create this formula? Only a number should be allowed, rest all result in an error.

enter image description here

enter image description here

Upvotes: 0

Views: 2072

Answers (1)

Meet
Meet

Reputation: 243

In case anyone else needs it.

formulae: ['=AND(A5>=0,A5<=100,CELL("format", A5)<>"P0")']

Upvotes: 0

Related Questions