1
Hello, I need help to create a more elegant formula than the one I present below:
=IF(OR(AND(C11>=3302000;C11<=3303999);AND(C11>=3602000;C11<=3603999));
$B$3;IF(OR(AND(C11>=3402000;C11<=3403999);AND(C11>=3702000;C11<=3703999));
$B$4;IF(OR(AND(C11>=3121000;C11<=3121999);AND(C11>=3181000;C11<=3191999);
AND(C11>=3131000;C11<=3137999));$B$5;IF(OR(AND(C11>=3122000;C11<=3122999);
AND(C11>=3281000;C11<=3291999);AND(C11>=3231000;C11<=3237999));
$B$6;IF(C11="N/A";"N/A";C11)))))
What the formula needs to do is to see if the value of C11 is in the image value envelopes and, if it is, put the name of the envelope in cell B11.
Suggestions? Thank you.
When the ranges are sequential and unique, it is very easy to do what you want by merely creating a list with the upper bounds (with two columns, vc puts in A the names of the envelopes and in B the maximum value of the range that belongs to the name in A) and using PROCV with the last parameter equal to True. As it is not your case (because you have several ranges for the same envelope), the best solution is to even use VBA.
– Luiz Vieira