vLookup formula stopped working - maybe too formula too long?

Metalboy

New Member
Joined
Jun 25, 2020
Messages
8
Office Version
  1. 365
Platform
  1. Windows
This is my formula that now doesn't work having added more to it (see highlighted)

=IF(AND(A3="CS",C3="Yes"),VLOOKUP(B3,Param_Temp_cs_InsYes,2,FALSE),IF(AND(A3="CS",C3="No"),VLOOKUP(B3,Param_Temp_cs_InsNo,2,FALSE),IF(AND(A3="Austenitic",C3="Yes"),VLOOKUP(B3,Param_Temp_ac_InsYes,2,FALSE),IF(AND(A3="Duplex",C3="Yes"),VLOOKUP(B3,Param_Temp_ac_InsYes,2,FALSE),IF(AND(A3="SS",C3="Yes"),VLOOKUP(B3,Param_Temp_ac_InsYes,2,FALSE),IF(AND(A3="Austenitic",C3="No"),VLOOKUP(B3,Param_Temp_ac_InsYes,2,FALSE),IF(AND(A3="Duplex",C3="No"),VLOOKUP(B3,Param_Temp_ac_InsYes,2,FALSE),IF(AND(A3="SS",C3="No"),VLOOKUP(B3,Param_Temp_ac_InsYes,2,FALSE),IF(AND(A3="CS",C3="Yes"),VLOOKUP(B3,Param_Temp_cs_InsYes_MaxRng,2,FALSE))))))))))

The formula worked fine before i added the highlighted vlookup statement. Have I hit a character limit for formula's do you think?

I have both tested the offending formula in isolation and it works fine and also rearranged the formula and placed the statement at the beginning after which that part of the formula works fine but one of the other statements does not. So thats why I think i've hit a character limit perhaps.

Any help would be greatly appreciated.
 
The bit " AND(A3="CS",C3="Yes") " is already in the first IF statement:

=IF(AND(A3="CS",C3="Yes"),VLOOKUP(B3,cs_IY,2,FALSE),IF(AND(A3="CS",C3="No"),VLOOKUP(B3,cs_IN,2,FALSE),IF(AND(A3="Austenitic",C3="Yes"),VLOOKUP(B3,ac_IY,2,FALSE),IF(AND(A3="Duplex",C3="Yes"),VLOOKUP(B3,ac_IY,2,FALSE),IF(AND(A3="SS",C3="Yes"),VLOOKUP(B3,ac_IY,2,FALSE),IF(AND(A3="Austenitic",C3="No"),VLOOKUP(B3,ac_IY,2,FALSE),IF(AND(A3="Duplex",C3="No"),VLOOKUP(B3,ac_IY,2,FALSE),IF(AND(A3="SS",C3="No"),VLOOKUP(B3,ac_IY,2,FALSE),IF(AND(A3="CS",C3="Yes"),VLOOKUP(B3,cs_IYMR,2,FALSE))))))))))

If it returns TRUE in the first instance, the formula should return the result of VLOOKUP(B3,cs_IY,2,FALSE)
If it is FALSE in the first instance, it'll also be false in the second and the formula result will be "FALSE" because the ELSE part of the last IF function is missing.

Thanks so much, that was my problem! I couldn't see the wood for the trees. Really appreciate you all taking the time to help out.
 
Upvote 0

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Forum statistics

Threads
1,214,826
Messages
6,121,794
Members
449,048
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top