Solved

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

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

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…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

816 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

9 Experts available now in Live!

Get 1:1 Help Now