Good afternoon,
I am working on setting up a worksheet that needs to review three different variables. I need the space to say either "yes" to an exception or "no". It needs to review the three variables (amount, rate, and rating) to see where it falls into the table. I am not too excel savy so the only solution I have come up with is a nested if statement. The problem is it is too messy and doesn't always work. I am not sure what to do to get it to work. Attached is the spreadsheet showing the problem but here is the formula as well.
=IF((C10>=2501000)*AND(C12=1)*AND(C8<(MAX('Pricing Matrix'!E10:'Pricing Matrix'!F10))),"yes",(IF((C10>=2501000)*AND(C12=2)*AND(C8<(MAX('Pricing Matrix'!H10:'Pricing Matrix'!I10))),"yes",(IF((C10>=2501000)*AND(C12=3)*AND(C8<(MAX('Pricing Matrix'!K10:'Pricing Matrix'!L10))),"yes",(IF((C10>=2501000)*AND(C12=4)*AND(C8<(MAX('Pricing Matrix'!N10:'Pricing Matrix'!O10))),"yes",(IF((C10>=2501000)*AND(C12=5)*AND(C8<(MAX('Pricing Matrix'!Q10:'Pricing Matrix'!R10))),"yes",(IF((C10>=2501000)*AND(C12=6)*AND(C8<(MAX('Pricing Matrix'!T10:'Pricing Matrix'!U10))),"yes",(IF((2501000>C10>=1001000)*AND(C12=1)*AND(C8<(MAX('Pricing Matrix'!E9:'Pricing Matrix'!F9))),"yes",(IF((2501000>C10>=1001000)*AND(C12=2)*AND(C8<(MAX('Pricing Matrix'!H9:'Pricing Matrix'!I9))),"yes",(IF((2501000>C10>=1001000)*AND(C12=3)*AND(C8<(MAX('Pricing Matrix'!K9:'Pricing Matrix'!L9))),"yes",(IF((2501000>C10>=1001000)*AND(C12=4)*AND(C8<(MAX('Pricing Matrix'!N9:'Pricing Matrix'!O9))),"yes",(IF((2501000>C10>=1001000)*AND(C12=5)*AND(C8<(MAX('Pricing Matrix'!Q9:'Pricing Matrix'!R9))),"yes",(IF((2501000>C10>=1001000)*AND(C12=6)*AND(C8<(MAX('Pricing Matrix'!T9:'Pricing Matrix'!U9))),"yes",(IF((1001000>C10>=501000)*AND(C12=1)*AND(C8<(MAX('Pricing Matrix'!E8:'Pricing Matrix'!F8))),"yes",(IF((1001000>C10>=501000)*AND(C12=2)*AND(C8<(MAX('Pricing Matrix'!H8:'Pricing Matrix'!I8))),"yes",(IF((1001000>C10>=501000)*AND(C12=3)*AND(C8<(MAX('Pricing Matrix'!K8:'Pricing Matrix'!L8))),"yes",(IF((1001000>C10>=501000)*AND(C12=4)*AND(C8<(MAX('Pricing Matrix'!N8:'Pricing Matrix'!O8))),"yes",(IF((1001000>C10>=501000)*AND(C12=5)*AND(C8<(MAX('Pricing Matrix'!Q8:'Pricing Matrix'!R8))),"yes",(IF((1001000>C10>=501000)*AND(C12=6)*AND(C8<(MAX('Pricing Matrix'!T8:'Pricing Matrix'!U8))),"yes",(IF((501000>C10>=151000)*AND(C12=1)*AND(C8<(MAX('Pricing Matrix'!E7:'Pricing Matrix'!F7))),"yes",(IF((501000>C10>=151000)*AND(C12=2)*AND(C8<(MAX('Pricing Matrix'!H7:'Pricing Matrix'!I7))),"yes",(IF((501000>C10>=151000)*AND(C12=3)*AND(C8<(MAX('Pricing Matrix'!K7:'Pricing Matrix'!L7))),"yes",(IF((501000>C10>=151000)*AND(C12=4)*AND(C8<(MAX('Pricing Matrix'!N7:'Pricing Matrix'!O7))),"yes",(IF((501000>C10>=151000)*AND(C12=5)*AND(C8<(MAX('Pricing Matrix'!Q7:'Pricing Matrix'!R7))),"yes",(IF((501000>C10>=151000)*AND(C12=6)*AND(C8<(MAX('Pricing Matrix'!T7:'Pricing Matrix'!U7))),"yes",(IF((151000>C10>=51000)*AND(C12=1)*AND(C8<(MAX('Pricing Matrix'!E6:'Pricing Matrix'!F6))),"yes",(IF((151000>C10>=51000)*AND(C12=2)*AND(C8<(MAX('Pricing Matrix'!H6:'Pricing Matrix'!I6))),"yes",(IF((151000>C10>=51000)*AND(C12=3)*AND(C8<(MAX('Pricing Matrix'!K6:'Pricing Matrix'!L6))),"yes",(IF((151000>C10>=51000)*AND(C12=4)*AND(C8<(MAX('Pricing Matrix'!N6:'Pricing Matrix'!O6))),"yes",(IF((151000>C10>=51000)*AND(C12=5)*AND(C8<(MAX('Pricing Matrix'!Q6:'Pricing Matrix'!R6))),"yes",(IF((151000>C10>=51000)*AND(C12=6)*AND(C8<(MAX('Pricing Matrix'!T6:'Pricing Matrix'!U6))),"yes",(IF((51000>C10>0)*AND(C12=1)*AND(C8<(MAX('Pricing Matrix'!E5:'Pricing Matrix'!F5))),"yes",(IF((51000>C10>0)*AND(C12=2)*AND(C8<(MAX('Pricing Matrix'!H5:'Pricing Matrix'!I5))),"yes",(IF((51000>C10>0)*AND(C12=3)*AND(C8<(MAX('Pricing Matrix'!K5:'Pricing Matrix'!L5))),"yes",(IF((51000>C10>0)*AND(C12=4)*AND(C8<(MAX('Pricing Matrix'!N5:'Pricing Matrix'!O5))),"yes",(IF((51000>C10>0)*AND(C12=5)*AND(C8<(MAX('Pricing Matrix'!Q5:'Pricing Matrix'!R5))),"yes",(IF((51000>C10>0)*AND(C12=6)*AND(C8<(MAX('Pricing Matrix'!T5:'Pricing Matrix'!U5))),"yes","no")))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
Is there an easier way to get this to work? And if there is, I might need a little more detail explaining to help understand. I don't know if the "and" statements in there work as well. Lender Pricing Worksheet.xlsx
Dear Dumpster,
YOu can try using a VLOOKUP FUNCTION WITH the TRUE APPROACH WHERE the Range Lookup will be carried out..
Just Make 2 Column Matrix where you put the Ranges in the First Column and the Values you want in the second column and then use VLOOKUP formula with the 1 or TRUE parameter.
Example:
MAtrix
Col A--Col B
0 Red
100 Blue
200 Orange
So if I put this into a VLookup for a lookup value of 80 the answer should be Red..
rEGARDS=vlookup(80,A:B,2,TRUE)
e4excel
Pl Try this function.
=IF(AND(C12>0,C12<=6),IF(OR(AND(51000>C10>0,C8<(MAX('Pricing Matrix'!E5:'Pricing Matrix'!F5))),AND(501000>C10>=151000,C8<(MAX('Pricing Matrix'!E7:'Pricing Matrix'!F7))),AND(1001000>C10>=501000,C8<(MAX('Pricing Matrix'!E8:'Pricing Matrix'!F8))),AND(2501000>C10>=1001000,C8<(MAX('Pricing Matrix'!E9:'Pricing Matrix'!F9))),AND(C10>=2501000,C8<(MAX('Pricing Matrix'!E10:'Pricing Matrix'!F10)))),"yes","NO"))
You might try:
you might want to add some pre-emptive checks to ensure C12 is 1-6, C10 is a valid number >=0 & C8 is a valid number=IF(C8<MAX(OFFSET('Pricing Matrix'!$E$5,MATCH(C10,{0,51000,151000,501000,1001000,2501000})-1,3*(C12-1),1,2)),"yes","no")
The above is Volatile (OFFSET) so if you use lots of these and / or you have lots of subsequent calculations using the result then you may wish to revisit (and use a non-volatile approach using INDEX - longer syntax than the above)
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
Posts answering a duplicate thread have been added to this thread
Last edited by arthurbr; 12-29-2011 at 08:55 AM.
Quoting entire posts clutters the forum and makes threads hard to read !
If you are pleased with a member's answer then use the Star icon to rate it
Click here to see forum rules
I tried this one and it didn't work. It matters if C12 is 1, 2, 3, 4, 5, or 6 which causes additional formulas needed. Is there a way to include that in here?
I can't vouch for the others but I believe that offered in post # 4 mirrors your original - if you feel otherwise please elaborate with examples.
To elaborate
C12 determines which two columns to reference for sake of MAX comparison
C10 determines which row to reference for sake of MAX comparison
C8 is the value to compare to the 2x1 range referenced above
Last edited by DonkeyOte; 12-29-2011 at 01:51 PM.
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks