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!):-


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
Who is Participating?

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

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.

Bill PrewCommented:
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?

Bill PrewCommented:
If so, why not just do this:



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.

Start your 7-day free trial
vipamanAuthor Commented:
Bill, think that what comes from a 12 hour day - Formula blindness. I started like that and something didn't work.  Cheers
Bill PrewCommented:
Great, glad that helped.

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.