Solved

I would like to populate one cell (A1) with '*' if a range of 5 other cells (B1:B5) contain at least one instance of 'yes' and at least one instance of 'no'.

Posted on 2016-09-23
7
31 Views
Last Modified: 2016-10-12
Hello
I would like to populate one cell (A1) with '*' if a range of 5 other cells (B1:B5) contain at least one instance of 'yes' and at least one instance of 'no'.  As an example, if B1 = yes, B2 =yes, B3=no, B4=yes, B5=yes then A1=*
Thanks for your help
0
Comment
Question by:Dave
  • 3
  • 3
7 Comments
 
LVL 19

Assisted Solution

by:crystal (strive4peace) - Microsoft MVP, Access
crystal (strive4peace) - Microsoft MVP, Access earned 250 total points (awarded by participants)
ID: 41813235
formula in A1:
=IF(AND(COUNTIF(B1:B5,"yes")>=1,COUNTIF(B1:B5,"no")>=1),"*","")

Open in new window

0
 
LVL 28

Accepted Solution

by:
Subodh Tiwari (Neeraj) earned 250 total points (awarded by participants)
ID: 41813386
@Crystal
I think the condition >0 is more correct as per the logic i.e. to check if any instance occurs like this. :)

=IF(AND(COUNTIF(B1:B5,"yes")>0,COUNTIF(B1:B5,"no")>0),"*","")

Open in new window


And this can be also written as
=IF(AND(COUNTIF(B1:B5,"yes"),COUNTIF(B1:B5,"no")),"*","")

Open in new window

0
 
LVL 19
ID: 41813392
namaste, Subodh - thank you
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 28

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41813397
Namaste Crystal! :)
You're welcome.
0
 

Author Comment

by:Dave
ID: 41837317
My apologies for the delay and thank you both for your quick responses
The suggested points distribution is certainly fine with me.
Dave
0
 
LVL 19
ID: 41837384
you're welcome, Dave ~ happy to help
धन्यवाद, Subodh (not sure of your dialect -- Google helped me)
0
 
LVL 28

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41839776
The chosen answers resolved the question.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now