SOLVED

# Help me with if then function!

Occasional Contributor

# Help me with if then function!

hello members,

I will be really grateful if you could help me with this question:

I have seven columns that are either filled or not filled. I need a function to fulfil the following conditions:

Either one of the columns has a number value

or

no number value in any of the columns

If either of the above conditions fulfil, I should have "1" as a column value, else 0.

10 Replies

# Re: Help me with if then function!

@suchetalahiri , wouldn't the result always be TRUE? Maybe I'm missing something. Do you have sample data (without any confidential info) to illustrate?

# Re: Help me with if then function!

@TheAntonyHi Anthony, I cant share the data as I am doing a research project on it. I don't want true or false, I want it 0 or 1 as the data is to be used for further analysis. Guess even if we can do true or false, we can turn it into 0 or 1 with the further formula, no?

# Re: Help me with if then function!

@suchetalahiri , yes the result will be 0 and 1. This is the process of constructing the conditional formula you are requesting. My question is around the logic. Based on what I understand from your explanation, the result will always be 1. Perhaps you can let me know the error in my logic by looking at the sample file attached.

# Re: Help me with if then function!

@TheAntonyHi George, I have uploaded a sample file just to explain the background, please let me know if you can crack it. Thank you, kindly.

Best Response confirmed by suchetalahiri (Occasional Contributor)
Solution

# Re: Help me with if then function!

@suchetalahiri , ok, I think I got it. If there are more than 1 values in the categories, then result should be 0. No value or 1 value results in 1. See attached.

# Re: Help me with if then function!

@TheAntonyYou're a genius! yes, it did! My next question is what if we have following condition:

We should get 1 if the count is at least two categories or more?

# Re: Help me with if then function!

@TheAntony  guess this?

=IF(COUNTA(A16:K16)>=2,1,0)

sorry just copied yours and tried my logic!

# Re: Help me with if then function!

@suchetalahiri , you got it.

# Re: Help me with if then function!

@TheAntonyThank you and grateful for your help, George

# Re: Help me with if then function!

@suchetalahiri , Glad I could help!