If statement

ekhawaja

Board Regular
Joined
Dec 16, 2018
Messages
60
Office Version
  1. 365
Looking for an if statement to check 5 column for value of "1", and if ALL have 1, return "1", otherwise "0"

1708540584706.png
 
Another option
Fluff.xlsm
ABCDEFGHIJK
1
2111111
3110110
410110
Data
Cell Formulas
RangeFormula
K2:K4K2=IF(SUM(CHOOSECOLS(A2:I2,SEQUENCE(,5,1,2)))=5,1,0)
 
Upvote 0
Solution

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Then either option in columns L or M should do what you are after. If not, let us know.
I only want to validate values in col A,C,E,G,I etc.......if they contain 1, i want result to show 1, otherwise 0.....they are specific columns....
 
Upvote 0
I only want to validate values in col A,C,E,G,I etc.......if they contain 1, i want result to show 1, otherwise 0.....they are specific columns....
And do the offered solutions NOT do just that? I am confused, both mine and Fluff's suggested formulas are only looking at those columns you mentioned.
 
Upvote 0
Another option
Fluff.xlsm
ABCDEFGHIJK
1
2111111
3110110
410110
Data
Cell Formulas
RangeFormula
K2:K4K2=IF(SUM(CHOOSECOLS(A2:I2,SEQUENCE(,5,1,2)))=5,1,0)
i think this works, this formula is only looking at every other column?
And do the offered solutions NOT do just that? I am confused, both mine and Fluff's suggested formulas are only looking at those columns you mentioned.
when i choose A2:I2 in the formula, is it not looking at column B ( i don't want to validate B)..
 
Upvote 0
i think this works, this formula is only looking at every other column?

when i choose A2:I2 in the formula, is it not looking at column B ( i don't want to validate B)..
No, it is not looking at column B. the "SEQUENCE(1,5,1,2)" portion of each of our formulas is telling it to look at every other column starting with column A.
 
Upvote 1
Glad we could help & thanks for the feedback.
 
Upvote 1

Forum statistics

Threads
1,215,347
Messages
6,124,421
Members
449,157
Latest member
mytux

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top