# Nested IF

#### hsandeep

##### Well-known Member
In 2 col, I m having either 0 or 1. In 3rd column i want to do the check (permutations & combinations).
It is like:
0 0 A
0 1 B
1 0 C
1 1 D
How to do it?
Also, how to count nos. of A, B, C & D generated?

### Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

#### davesweep

##### Well-known Member
Hi,

Does this

=INDEX({"A","B","C","D"},1+BIN2DEC(A1&B1))

or this

=INDEX({"A","B","C","D"},MATCH(VALUE(A1&B1),{0,1,10,11},0))

work for you?

You could use

=COUNTIF(C:C,"A")

to return the number of "A" generated.

#### mikerickson

##### MrExcel MVP
=choose(2*a1+b1+1,"a","b","c","d")

#### hsandeep

##### Well-known Member
INDEX({"A","B","C","D"},MATCH(VALUE(A1&B1),{0,1,10,11},0))

& even choose(2*a1+b1+1,"a","b","c","d") WORKS.

Which one would be "more comfortable"?

#### hsandeep

##### Well-known Member

In
INDEX({"A","B","C","D"},MATCH(VALUE(A1&B1),{0,1,10,11},0))
instead of A, B, C & D, I want to get the numerical value lying in F1, G1, H1 & I1. How to accomplish it?

#### davesweep

##### Well-known Member
Index(f1:i1,match(value(a1&b1),{0,1,10,11},0))

#### hsandeep

##### Well-known Member

Done Sir..davesweep. Thanks a lot.

No worries.

#### hsandeep

##### Well-known Member
Index(f1:i1,match(value(a1&b1),{0,1,10,11},0))

I got the the numerical value lying in F1, G1, H1 & I1.
I got these values in column C.
Now, how to check the "COUNT" of values in column C are less than the numerical value lying in X1, Y1 & Z1?

##### Active Member
Hi, You can try the formula:
Code:
``=CHAR(65+BIN2DEC(A1&B1))``
also,

best regards.

Replies
4
Views
148
Replies
7
Views
86
Replies
6
Views
150
Replies
18
Views
316
Replies
1
Views
106

1,130,168
Messages
5,640,543
Members
417,151
Latest member
ChickenTenderer

### 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.

### Which adblocker are you using?

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

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