What I am trying to do is have cell H111 on Sheet 'Calc Addl M (samples)' to look to Sheet 'Quote' B24 and if B24 = "40" and B23="8" then enter cost from X5 on 'fedex chart'

What this is doing is looking at the weight of the piece (either 40lb or 60/70lb, then the page count (8,12,16,24,32) to detemine what the cost of shipping is on Sheet called 'fedex chart'.
I currently have IF statements to get cost based on page count only, but know I also need weight of piece as the 40lb paper is cheaper to mail then the 60 or 70lb paper.

Here is my current formula:
=IF(Quote!B23=8,'fedex chart'!X5,IF(Quote!B23=12,'fedex chart'!X6,IF(Quote!B23=16,'fedex chart'!X6,IF(Quote!B23=20,'fedex chart'!X7,IF(Quote!B23=24,'fedex chart'!X7,'fedex chart'!X8)))))

I think i need to add an AND statement, but cant seem to get it to work. Any help is greatly appreciated.
Thanks