Solved

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

Posted on 2013-02-06
4
180 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

636 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