I am trying to get the following IF statement to work but struggling.

I want the following to calculate the days between, if there is a date in T11 or Y11 (leave blank if empty). Then the second formula onwards is to calculate the amount of days between dates if in Q11 equals to M1, M2, D, E, MW or SV

=IF(AND(ISBLANK(T11),ISBLANK(Y11))," ",IF(Q11="M1",Y11-T11," ",IF(Q11="M2",Y11-T11," ",IF(Q11="D",Y11-T11," ",IF(Q11="E",Y11-T11," ",IF(Q11="MW",Y11-T11," ",IF(Q11="SV",Y11-T11," "))))

Hope this makes sense?

Jav