# Combination of 1/0 with TRUE/FALSE

#### hsandeep

##### Well-known Member
Column B2:B7 is EITHER of 1 OR 0
Input Data Range D2:H7 is EITHER of TRUE OR FALSE
Input ‘Header’ (above D2:H7) i.e. D1:H1 is 111, 222, 333, 444 & 555

Output Range J2:N7 as shown:

How to accomplish.
I am using Excel 2007
Sheet2

 B C D E F G H I J K L M N 1 1 or 0 111 222 333 444 555 2 1 TRUE TRUE TRUE TRUE TRUE 111 222 333 444 555 3 1 FALSE FALSE FALSE FALSE FALSE 0 0 0 0 0 4 0 TRUE TRUE TRUE TRUE TRUE 0 0 0 0 0 5 0 FALSE FALSE FALSE FALSE FALSE 0 0 0 0 0 6 1 TRUE FALSE TRUE FALSE TRUE 111 0 333 0 555 7 1 TRUE TRUE TRUE FALSE FALSE 111 222 333 0 0

<colgroup><col style="FONT-WEIGHT: bold; WIDTH: 30px"><col style="WIDTH: 41px"><col style="WIDTH: 13px"><col style="WIDTH: 42px"><col style="WIDTH: 42px"><col style="WIDTH: 42px"><col style="WIDTH: 42px"><col style="WIDTH: 42px"><col style="WIDTH: 13px"><col style="WIDTH: 42px"><col style="WIDTH: 42px"><col style="WIDTH: 42px"><col style="WIDTH: 42px"><col style="WIDTH: 42px"></colgroup><tbody>
</tbody>

### Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

#### Eric W

##### MrExcel MVP
In J2:

=D\$1*\$B2*D2

Copy down and across as needed.

#### Joe4

Put this formula in cell J2 and copy to all other cells in J2:N7:
Code:
``=\$B2*D2*D\$1``

Edit: Too slow! Eric beat me to the punch!

Last edited:

#### hsandeep

##### Well-known Member
Put this formula in cell J2 and copy to all other cells in J2:N7:
Code:
``=\$B2*D2*D\$1``

Edit: Too slow! Eric beat me to the punch!
Thanks Eric. IT WORKS

Last edited:

#### Eric W

##### MrExcel MVP

(I saw it just a little sooner, Joe!)

#### hsandeep

##### Well-known Member

B2:B5 is 1, 0, 1, 0 as shown
C2:C5 is TRUE, TRUE, FALSE, FALSE as shown

E2:I5 is ‘continuous’ column & rows filled with values

2 INPUT ranges are there:
INPUT range 1: B7:B16 which is EITHER of 1 OR 0
INPUT range 2: E7:I16 which is EITHER of TRUE OR FALSE

OUTPUT RANGE (Formula required): K7:O16 as shown (I think it should be clear)

How to accomplish?
I am using Excel 2007
Sheet3

 B C D E F G H I J K L M N O 2 1 TRUE 10 20 30 40 50 3 0 TRUE 11 22 33 44 55 4 1 FALSE 111 222 333 444 555 5 0 FALSE 1111 2222 3330 4440 5550 6 7 1 TRUE TRUE TRUE TRUE TRUE 10 20 30 40 50 8 0 TRUE TRUE TRUE TRUE TRUE 11 22 33 44 55 9 1 TRUE FALSE FALSE FALSE TRUE 10 222 333 444 50 10 0 FALSE TRUE FALSE TRUE FALSE 1111 22 3330 44 5550 11 12 13 14 15 16 1 TRUE TRUE TRUE FALSE FALSE 10 20 30 444 555

<colgroup><col style="FONT-WEIGHT: bold; WIDTH: 30px"><col style="WIDTH: 23px"><col style="WIDTH: 43px"><col style="WIDTH: 15px"><col style="WIDTH: 43px"><col style="WIDTH: 43px"><col style="WIDTH: 43px"><col style="WIDTH: 43px"><col style="WIDTH: 43px"><col style="WIDTH: 13px"><col style="WIDTH: 38px"><col style="WIDTH: 38px"><col style="WIDTH: 38px"><col style="WIDTH: 38px"><col style="WIDTH: 38px"></colgroup><tbody>
</tbody>

#### Eric W

##### MrExcel MVP
In K7:

=IF(\$B7="","",SUMPRODUCT(E\$2:E\$5*(\$B\$2:\$B\$5=\$B7)*(\$C\$2:\$C\$5=E7)))

Copy down and across as needed.

#### hsandeep

##### Well-known Member
In K7:

=IF(\$B7="","",SUMPRODUCT(E\$2:E\$5*(\$B\$2:\$B\$5=\$B7)*(\$C\$2:\$C\$5=E7)))

Copy down and across as needed.
Simply MARVELLOUS....Thanks Eric. IT WORKS

You're welcome.