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
vipamanAsked:
Who is Participating?
 
Bill PrewConnect With a Mentor Commented:
If so, why not just do this:

sshot-443.png

»bp
0
 
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?


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


»bp
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.