Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

if statement problem

Hello to all of you,

i have a problem. I want to check if two numbers are available in my table when i selected my Sell Nr.

The if statement doesn't work and i don't know why.

Here are the Statement:

if((NR=123456 and NR=7891011),'Yes','No')

For the selected Sell Nr there are both number (NR) available, so it should be on "Yes" and not of "No".

What is my mistake?

Kind Regards

1 Solution

Accepted Solutions
tresesco
MVP
MVP

In a text box:

=If(Index(Concat(DISTINCT NR), '123456') And Index(Concat(DISTINCT NR), '7891011'), 'Yes', 'No')

View solution in original post

5 Replies
alexandros17
Partner - Champion III
Partner - Champion III

You used AND but the condition is OR ... try and let me know

anbu1984
Master III
Master III

When you select one NR, other NR is not available. So you didnt result

Can you explain with source data what are you trying to do?

tresesco
MVP
MVP

In a text box:

=If(Index(Concat(DISTINCT NR), '123456') And Index(Concat(DISTINCT NR), '7891011'), 'Yes', 'No')

Not applicable
Author

Hello,

i have a table (head) that call "Sell" there is a Sell Nr. Then i have a table with the details "Sell details".

The both tables are linked over the SellNr. In the "Sell details" are two lines and so i have in the column "NR" two numbers. But i only want to calculate when both numbers are in the "Sell details". So i want to say, only when the numbers are in this, then you have to do.... I only have test it with Yes or No to prove if this are in the table.

anbu1984
Master III
Master III

Can you post sample data