If and or...

John BX

New Member
Joined
Dec 22, 2014
Messages
36
DaysR1R2R3R4R5R6R7Completed
3
1
7

<tbody>
</tbody>

Hi,

Im trying to figure out the formula to go in the "Completed" column in my sheet above, which should show "Yes" or "No".

The Days column can contain a number between 1 and 7.
The first row of the days column has the value 3, so I want to have the Completed column to show "Yes" if R1,R2 and R3 *all* contain any value, otherwise it should show "No".

Likewise the 2nd row in the days column has the value 1 so only R1 needs to have a value to show "Yes" in the Completed column.
again the 3rd days row has 7 so all 7 R columns need a value to show "Yes".

Thanks

John
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Excel 2010
I
1Completed
2Yes
3Yes
4No
Sheet1
Cell Formulas
RangeFormula
I2=IF(SUMPRODUCT(--ISNUMBER(B2:OFFSET(A2,0,A2)))/A2=1,"Yes","No")
I3=IF(SUMPRODUCT(--ISNUMBER(B3:OFFSET(A3,0,A3)))/A3=1,"Yes","No")
I4=IF(SUMPRODUCT(--ISNUMBER(B4:OFFSET(A4,0,A4)))/A4=1,"Yes","No")
 
Upvote 0
There might be a smarter way but this works for me:

Assuming that Days is in A1 etc.
Code:
=IF(A2=0;"",IF(COUNTA(OFFSET(A2,,1,,A2))=A2,"YES","NO"))
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,276
Members
449,075
Latest member
staticfluids

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