Solved

Formula Help - Probably involves IF() and AND()

Posted on 2013-02-06
4
139 Views
Last Modified: 2013-02-11
Hello Experts,

I am currently working on a workbook, which relies on the user inputting values in order to get the answer.

Please view screenshot - Formula
I've spent the majory of the past few nights working on formulas, but this one. has stumped me completely.

Cell I7, returns an answer.  But I don't want that cell to show anything, until certain things are true.

I know how to make a cell appear empty, but this will rely on IF() and AND(), and I've tried to do it myself - but no luck.

Ok....

If the object is set to "Square / Rectangle" (cell B7), and the count of range B7:G7 = 6 (meaning all those cells have values), then yes return the answer in cell I7.

Here where it gets complicated...

If the object is set to "Cylinder" then cell B7, C7 OR D7, E7:G7, and the count of that range = 5, then yes the value in I7 needs to be visible.

Thank you in advance for your help!

~ Geekamo
0
Comment
Question by:Geekamo
  • 2
4 Comments
 
LVL 26

Accepted Solution

by:
redmondb earned 500 total points
ID: 38858980
Hi, geekamo,

I wasn't sure exactly what you meant by " then cell B7, C7 OR D7, E7:G7, and the count of that range = 5". The following just checks that B7:G7 has exactly 5 non-blank cells...
=IF(OR(AND(B7="Square / Rectangle",COUNTIF(B7:G7,"<>")=6),AND(B7="Cylinder",COUNTIF(B7:G7,"<>")=5)),I7,"")

Edit: BTW, it would be marginally more efficient to check the range C7:G7 and reduce the numbers by one, but I assumed that the full range would be clearer for you.

Regards,
Brian.
0
 
LVL 8

Expert Comment

by:5teveo
ID: 38859029
My take is something like this...

=IF(OR(AND(B4="Square",COUNTA(B4:G4)=6),AND(B4="Cylinder",COUNTA(B4:G4)=5,COUNTA(C4:D4)=1)),1,0)

The cylinder range must have 5 items and if C or D is space then you got everything you need in all columns.
0
 
LVL 1

Author Comment

by:Geekamo
ID: 38866822
@ All,

Sorry for the delay in getting back to my post.  I will be back over the weekend.  Thank you in advance for your patience!

~ Geekamo
0
 
LVL 26

Expert Comment

by:redmondb
ID: 38878366
Thanks, Geekamo.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

705 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

20 Experts available now in Live!

Get 1:1 Help Now