I am trying to write an IF condition, first criteria is Column D,
If Column D Value is 3, then Result value should be 99006661001
If Column D Value is 9, then Result Value should be 52006881570
If Column D Value is 6 or 5, then second criteria is based on Column C (First 2 digits),
If first two digits of C is 11, then Result Value should be 010066743
If first two digits of C is 12, then Result Value should be 020066743
If first two digits of C is 13, then Result Value should be 030066743
If first two digits of C is 14, then Result Value should be 520066743
If first two digits of C is 15, then Result Value should be 050066743
If first two digits of C is 16, then Result Value should be 050066743
Now the problem i am facing is, with Column D value 5, why is it giving me False?
[TABLE="width: 500"]
<tbody>[TR]
[TD]#[/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD]11858594[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD]FALSE[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD]11858275[/TD]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD]010066743[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD]11857038[/TD]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD]99006661001[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD]11858479[/TD]
[TD]9[/TD]
[TD][/TD]
[TD][/TD]
[TD]52006881570[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD]61674304[/TD]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD]FALSE[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD]11854352[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD]FALSE[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD][/TD]
[TD][/TD]
[TD]11858622[/TD]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD]010066743[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD][/TD]
[TD][/TD]
[TD]11858520[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD]FALSE[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD][/TD]
[TD][/TD]
[TD]11858132[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD]FALSE[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD][/TD]
[TD][/TD]
[TD]11858124[/TD]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD]010066743[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD][/TD]
[TD][/TD]
[TD]62367347[/TD]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD]FALSE[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD][/TD]
[TD][/TD]
[TD]11858488[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD]FALSE[/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD][/TD]
[TD][/TD]
[TD]11858698[/TD]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD]010066743[/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD][/TD]
[TD][/TD]
[TD]63158920[/TD]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD]FALSE[/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD][/TD]
[TD][/TD]
[TD]11858655[/TD]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD]010066743[/TD]
[/TR]
[TR]
[TD]16[/TD]
[TD][/TD]
[TD][/TD]
[TD]11858534[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD]FALSE[/TD]
[/TR]
</tbody>[/TABLE]
Here's my formula, typed in Range G2:
Will appreciate if my mistake is rectified.
Thanks in advance.
If Column D Value is 3, then Result value should be 99006661001
If Column D Value is 9, then Result Value should be 52006881570
If Column D Value is 6 or 5, then second criteria is based on Column C (First 2 digits),
If first two digits of C is 11, then Result Value should be 010066743
If first two digits of C is 12, then Result Value should be 020066743
If first two digits of C is 13, then Result Value should be 030066743
If first two digits of C is 14, then Result Value should be 520066743
If first two digits of C is 15, then Result Value should be 050066743
If first two digits of C is 16, then Result Value should be 050066743
Now the problem i am facing is, with Column D value 5, why is it giving me False?
[TABLE="width: 500"]
<tbody>[TR]
[TD]#[/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD]11858594[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD]FALSE[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD]11858275[/TD]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD]010066743[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD]11857038[/TD]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD]99006661001[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD]11858479[/TD]
[TD]9[/TD]
[TD][/TD]
[TD][/TD]
[TD]52006881570[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD]61674304[/TD]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD]FALSE[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD]11854352[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD]FALSE[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD][/TD]
[TD][/TD]
[TD]11858622[/TD]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD]010066743[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD][/TD]
[TD][/TD]
[TD]11858520[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD]FALSE[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD][/TD]
[TD][/TD]
[TD]11858132[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD]FALSE[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD][/TD]
[TD][/TD]
[TD]11858124[/TD]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD]010066743[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD][/TD]
[TD][/TD]
[TD]62367347[/TD]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD]FALSE[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD][/TD]
[TD][/TD]
[TD]11858488[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD]FALSE[/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD][/TD]
[TD][/TD]
[TD]11858698[/TD]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD]010066743[/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD][/TD]
[TD][/TD]
[TD]63158920[/TD]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD]FALSE[/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD][/TD]
[TD][/TD]
[TD]11858655[/TD]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD]010066743[/TD]
[/TR]
[TR]
[TD]16[/TD]
[TD][/TD]
[TD][/TD]
[TD]11858534[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD]FALSE[/TD]
[/TR]
</tbody>[/TABLE]
Here's my formula, typed in Range G2:
=IF(D2=3;"99006661001";(IF(D2=9;"52006881570";
(IF(D2=6;(IF(LEFT(C2;2)="11";"010066743";IF(LEFT(C2;2)="12";"020066743";
IF(LEFT(C2;2)="13";"030066743";IF(LEFT(C2;2)="14";"520066743";
IF(LEFT(C2;2)="15";"050066743";IF(LEFT(C2;2)="16";"050066743";
(IF(D2=5;(IF(LEFT(C2;2)="11";"010066743";IF(LEFT(C2;2)="12";
"020066743";IF(LEFT(C2;2)="13";"030066743";IF(LEFT(C2;2)="14";
"520066743";IF(LEFT(C2;2)="15";"050066743";IF(LEFT(C2;2)="16";
"050066743")))))))))))))))))))))
Will appreciate if my mistake is rectified.
Thanks in advance.