Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All
I've the following IF formula which looks in Columns A:F and based on what is in the Cell - "Yes" or "N/A", it will write "Yes" if "Yes" or "N/A" is written in the cell and "O/S" if the row is empty: =IF(OR(A1="Yes",B1="Yes",C1="Yes",D1="Yes",E1="Yes ",F1="Yes"),"Yes",IF (OR(A1="N/A",B1="N/A",C1="N/A",D1="N/A",E1="N/A",F1="N/A"),"Yes","O/ S")) My questions are as follows: I think this works, but it seems quite a long winded way of doing it, is there a way of simplifying it? From testing it, it seemed to work if the row was completely empty, is there a way to corporate the blank into the formula, or is it best to leave it as it is? Cheers in advance guys |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
=IF(OR(COUNTIF(A1:F1,"Yes")0,COUNTIF(A1:F1,"N/A")),"Yes","O/S")
-- __________________________________ HTH Bob "Stav19" wrote in message ... Hi All I've the following IF formula which looks in Columns A:F and based on what is in the Cell - "Yes" or "N/A", it will write "Yes" if "Yes" or "N/A" is written in the cell and "O/S" if the row is empty: =IF(OR(A1="Yes",B1="Yes",C1="Yes",D1="Yes",E1="Yes ",F1="Yes"),"Yes",IF (OR(A1="N/A",B1="N/A",C1="N/A",D1="N/A",E1="N/A",F1="N/A"),"Yes","O/ S")) My questions are as follows: I think this works, but it seems quite a long winded way of doing it, is there a way of simplifying it? From testing it, it seemed to work if the row was completely empty, is there a way to corporate the blank into the formula, or is it best to leave it as it is? Cheers in advance guys |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() How about =IF(COUNTIF(A1:F1,"Yes")+COUNTIF(A1:F1,"N/A")0,"Yes","O/S") -- mdmackillop ------------------------------------------------------------------------ mdmackillop's Profile: http://www.thecodecage.com/forumz/member.php?userid=113 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=66545 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Feb 19, 11:01*pm, mdmackillop
wrote: How about =IF(COUNTIF(A1:F1,"Yes")+COUNTIF(A1:F1,"N/A")0,"Yes","O/S") -- mdmackillop ------------------------------------------------------------------------ mdmackillop's Profile:http://www.thecodecage.com/forumz/member.php?userid=113 View this thread:http://www.thecodecage.com/forumz/sh...ad.php?t=66545 Cheers guys, both viable options and do what I'm after!!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Regression Leverage Formula (Jerry W. Lewis or Mike Middleton)already have DFITS formula | Excel Worksheet Functions | |||
Build excel formula using field values as text in the formula | Excel Worksheet Functions | |||
Formula expected end of statement error, typing formula into cell as part of VBA macro | Excel Programming | |||
Cell doesn't show formula result - it shows formula (CTRL + ' doe. | Excel Worksheet Functions | |||
Commenting custom formula fields/formula on formula editor | Excel Programming |