# Nested If/And statement issue.

In the attached, I want the user to enter length and width data. For each length and width, there are a number of bays. L and W are divided by their respective bay no. So in the example, length =4800 and bays = 2. Output in cell F7 = 2400. In column U, I only i want to see L1 L2 entries, as ultimately i am plotting this data and will suppress the zeros hopefully. I was trying to work out how to do this and came up with (perhaps not the nicest of solutions!):-

=IF(AND(D7>1,D7<3),F7,IF(AND(D7>2,D7<4),F7,IF(AND(D7>3,D7<5),F7,IF(AND(D7>4,D7<6),F7,IF(D7=6,F7,0)))))

The issue I have, is L1 to L6 are all displaying values? I thought the logic looked OK. Only value that works is 1 for bay.

Thanks in advance Paul
scaffolddesigner_v1.xlsx
###### Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
So you want to see 2400 in L1 and L2, and 0 or blank in L3 - L6?  Based on the fact that D7 is 2, correct?

»bp
0
Commented:
If so, why not just do this:

»bp
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Author Commented:
Bill, think that what comes from a 12 hour day - Formula blindness. I started like that and something didn't work.  Cheers
0
Commented:
Great, glad that helped.

»bp
0
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.