Solved

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

Posted on 2013-02-06
4
166 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

828 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