Uk
July 9, 2022, 5:08am
1
Hi, Everyone
I just wonder How to count this criteria,
say, In a table consist of three columns:
NAME A: (TYPE TEXT)
NAME B: (TYPE TEXT)
AMOUNT : (TYPE NUMBER)
I need this result,
If I Write a data in column NAME A or NAME B, the column AMOUNT will appear 1
If I Write a data in column NAME A and NAME B, the column AMOUNT will appear 2
I used this formula in AMOUNT, Count([NAME A]+[NAME B]), but it didn’t work.
any idea?
Please try
IFS( OR(
AND( ISNOTBLANK(Name A]), ISBLANK(Name B])),
AND( ISNOTBLANK(Name B]), ISBLANK(Name A]))
), [AMOUNT]=1 ,
AND( ISNOTBLANK(Name A]) , ISNOTBLANK(Name B])) ,
[AMOUNT]=2
)
1 Like
Uk
July 9, 2022, 5:40am
3
thanks for replaying, but it appears
The expression is valid but its result type ‘Yes/No’ is not one of the expected types: Number
Please share the screenshot of expression and error and column setting.
1 Like
Sorry, there were typos in expression, several “[” parenthesis were missing. Please try
IFS( OR(
AND( ISNOTBLANK([Name A]), ISBLANK([Name B])),
AND( ISNOTBLANK([Name B]), ISBLANK([Name A]))
), [AMOUNT]=1 ,
AND( ISNOTBLANK([Name A]) , ISNOTBLANK([Name B])) ,
[AMOUNT]=2
)
1 Like
Uk
July 9, 2022, 6:50am
6
When I write data in NAME A or B , The Amount will count 1, but When I write Data both NAME A and B it will count 2, because it count number if data in the two columns. Can we use Count formula in AMOUNT column ? thank you @Suvrutt_Gurjar
Please try in app formula of [AMOUNT] the following expression
I
IFS( OR(
AND( ISNOTBLANK([Name A]), ISBLANK([Name B])),
AND( ISNOTBLANK([Name B]), ISBLANK([Name A]))
), 1 ,
AND( ISNOTBLANK([Name A]) , ISNOTBLANK([Name B])) ,
2
)
2 Likes
Uk
July 9, 2022, 7:31am
9
Yeah it works . thank you @Suvrutt_Gurjar
2 Likes