COUNTING NUMBER OF DATA FROM TYPE TEXT

Uk
Silver 1
Silver 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?

Solved Solved
0 8 118
2 ACCEPTED SOLUTIONS

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

)

View solution in original post

Uk
Silver 1
Silver 1

Yeah it works  😁 . thank you @Suvrutt_Gurjar  

View solution in original post

8 REPLIES 8

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

           )

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. 

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

           )

Uk
Silver 1
Silver 1

 

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 

image_2022-07-09_144731629.png

 

Uk
Silver 1
Silver 1

this is the data table

image_2022-07-09_145128494.png

 

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

)

Uk
Silver 1
Silver 1

Yeah it works  😁 . thank you @Suvrutt_Gurjar  

Top Labels in this Space