Counting if one value = another

chriscrompton

New Member
Joined
Oct 1, 2009
Messages
18
Hi,

I am having trouble with a formula on excel.

I have 10 columns named G1A, G1B, G2A, G2B, G3A, G3B, G4A, G4B, G5A, G5B. A = before and B = After. The values in the columns range from -2 to 2.

I need to count if any of G1A= G1B, G2A= G2B, G3A=G3B, G4A=G4B, G5A=G5B in a seperate column.

Any help would be appreciated! I have tried Count ifs and Sum if functions but none of them seem to work.

Cheers
Chris
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Assuming XL2007 or higher, you can't use whole columns for SUMPRODUCT with XL2003 and prior, you would have to shorten your named range by at least 1 row in that case.

=sumproduct(--(g1a=g1b),--(g1a<>""))
 
Upvote 0
If I understand correctly what you want, then I think this can help you:

<b>Excel 2007</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #A6AAB6"><colgroup><col width="25px" style="background-color: #E0E0F0" /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /></colgroup><thead><tr style=" background-color: #E0E0F0;text-align: center;color: #161120"><th></th><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th><th>F</th><th>G</th><th>H</th><th>I</th><th>J</th><th>K</th><th>L</th><th>M</th><th>N</th><th>O</th><th>P</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">1</td><td style="text-align: center;;">G1A</td><td style="text-align: center;;">G1B</td><td style="text-align: center;;">G2A</td><td style="text-align: center;;">G2B</td><td style="text-align: center;;">G3A</td><td style="text-align: center;;">G3B</td><td style="text-align: center;;">G4A</td><td style="text-align: center;;">G4B</td><td style="text-align: center;;">G5A</td><td style="text-align: center;;">G5B</td><td style="text-align: right;;"></td><td style="text-align: center;;">G1A=G1B</td><td style="text-align: center;;">G2A=G2B</td><td style="text-align: center;;">G3A=G3B</td><td style="text-align: center;;">G4A=G4B</td><td style="text-align: center;;">G5A=G5B</td></tr><tr ><td style="color: #161120;text-align: center;">2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">2</td><td style="text-align: center;;">0</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-1</td><td style="text-align: right;;"></td><td style="text-align: center;;">7</td><td style="text-align: center;;">1</td><td style="text-align: center;;">4</td><td style="text-align: center;;">7</td><td style="text-align: center;;">1</td></tr><tr ><td style="color: #161120;text-align: center;">3</td><td style="text-align: center;;">2</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">1</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">1</td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">4</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">2</td><td style="text-align: center;;">0</td><td style="text-align: center;;">1</td><td style="text-align: center;;">1</td><td style="text-align: center;;">1</td><td style="text-align: center;;">1</td><td style="text-align: center;;">0</td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">5</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">0</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">2</td><td style="text-align: center;;">2</td><td style="text-align: center;;">2</td><td style="text-align: center;;">2</td><td style="text-align: center;;">2</td><td style="text-align: center;;">0</td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">6</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">1</td><td style="text-align: center;;">2</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-1</td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">7</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">1</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">1</td><td style="text-align: center;;">2</td><td style="text-align: center;;">0</td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">8</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">0</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">1</td><td style="text-align: center;;">2</td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">9</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">0</td><td style="text-align: center;;">2</td><td style="text-align: center;;">2</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-2</td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">10</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">0</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">0</td><td style="text-align: center;;">-2</td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">11</td><td style="text-align: center;;">0</td><td style="text-align: center;;">2</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">0</td><td style="text-align: center;;">0</td><td style="text-align: center;;">2</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">0</td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">12</td><td style="text-align: center;;">0</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">0</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">1</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">0</td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">13</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">0</td><td style="text-align: center;;">1</td><td style="text-align: center;;">0</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">0</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-1</td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">14</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">2</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">0</td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">15</td><td style="text-align: center;;">1</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">0</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">0</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">2</td><td style="text-align: center;;">0</td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">16</td><td style="text-align: center;;">0</td><td style="text-align: center;;">1</td><td style="text-align: center;;">2</td><td style="text-align: center;;">0</td><td style="text-align: center;;">1</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">2</td><td style="text-align: center;;">2</td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">17</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">0</td><td style="text-align: center;;">2</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">2</td><td style="text-align: center;;">1</td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">18</td><td style="text-align: center;;">0</td><td style="text-align: center;;">0</td><td style="text-align: center;;">0</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">1</td><td style="text-align: center;;">0</td><td style="text-align: center;;">0</td><td style="text-align: center;;">1</td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">19</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">0</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">0</td><td style="text-align: center;;">1</td><td style="text-align: center;;">2</td><td style="text-align: center;;">0</td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">20</td><td style="text-align: center;;">1</td><td style="text-align: center;;">0</td><td style="text-align: center;;">1</td><td style="text-align: center;;">1</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">1</td><td style="text-align: center;;">0</td><td style="text-align: center;;">1</td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr></tbody></table><p style="width:3em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #A6AAB6;border-top:none;text-align: center;background-color: #E0E0F0;color: #161120">Plan1</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: #FFFFFF" ><tr><td style="padding:6px" ><b>Array Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #A6AAB6"><thead><tr style=" background-color: #E0E0F0;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">L2</th><td style="text-align:left">{=SUM(<font color="Blue">--(<font color="Red">A$2:A$20=B$2:B$20</font>)</font>)}</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">M2</th><td style="text-align:left">{=SUM(<font color="Blue">--(<font color="Red">C$2:C$20=D$2:D$20</font>)</font>)}</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">N2</th><td style="text-align:left">{=SUM(<font color="Blue">--(<font color="Red">E$2:E$20=F$2:F$20</font>)</font>)}</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">O2</th><td style="text-align:left">{=SUM(<font color="Blue">--(<font color="Red">G$2:G$20=H$2:H$20</font>)</font>)}</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">P2</th><td style="text-align:left">{=SUM(<font color="Blue">--(<font color="Red">I$2:I$20=J$2:J$20</font>)</font>)}</td></tr></tbody></table><b>Entered with Ctrl+Shift+Enter.</b> If entered correctly, Excel will surround with curly braces {}.
<b>Note: Do not try and enter the {} manually yourself</b></td></tr></table><br />

Markmzz
 
Upvote 0
Hi Mark,

Thanks for the quick reply. You are correct. There are a few things that I need changed.

One problem seems to be that the formula is counting the blank cells aswell. This spreadsheet is going to be updated over the course of a year and I would prefer a running total if that is possible.

Secondly, I need to combine the totals of L2,M2,N2,O2,P2 aswell

Thanks for your help

Chris
 
Upvote 0
Hi Mark,

Thanks for the quick reply. You are correct. There are a few things that I need changed.

One problem seems to be that the formula is counting the blank cells aswell. This spreadsheet is going to be updated over the course of a year and I would prefer a running total if that is possible.

Secondly, I need to combine the totals of L2,M2,N2,O2,P2 aswell

Thanks for your help

Chris

First:

Sorry, but I didn't understand this: I need to combine the totals of L2,M2,N2,O2,P2 aswell.

Could you give a example?

Second:

The formula without blank. Look at this (array formula again):

<b>Excel 2007</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #A6AAB6"><colgroup><col width="25px" style="background-color: #E0E0F0" /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /></colgroup><thead><tr style=" background-color: #E0E0F0;text-align: center;color: #161120"><th></th><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th><th>F</th><th>G</th><th>H</th><th>I</th><th>J</th><th>K</th><th>L</th><th>M</th><th>N</th><th>O</th><th>P</th><th>Q</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">1</td><td style="text-align: center;;">G1A</td><td style="text-align: center;;">G1B</td><td style="text-align: center;;">G2A</td><td style="text-align: center;;">G2B</td><td style="text-align: center;;">G3A</td><td style="text-align: center;;">G3B</td><td style="text-align: center;;">G4A</td><td style="text-align: center;;">G4B</td><td style="text-align: center;;">G5A</td><td style="text-align: center;;">G5B</td><td style="text-align: right;;"></td><td style="text-align: center;background-color: #92D050;;">G1A=G1B</td><td style="text-align: center;background-color: #FFFF00;;">G1A=G1B</td><td style="text-align: center;background-color: #FFFF00;;">G2A=G2B</td><td style="text-align: center;background-color: #FFFF00;;">G3A=G3B</td><td style="text-align: center;background-color: #FFFF00;;">G4A=G4B</td><td style="text-align: center;background-color: #FFFF00;;">G5A=G5B</td></tr><tr ><td style="color: #161120;text-align: center;">2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">2</td><td style="text-align: center;;">0</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-1</td><td style="text-align: right;;"></td><td style="text-align: center;background-color: #92D050;;">8</td><td style="text-align: center;background-color: #FFFF00;;">7</td><td style="text-align: center;background-color: #FFFF00;;">1</td><td style="text-align: center;background-color: #FFFF00;;">4</td><td style="text-align: center;background-color: #FFFF00;;">7</td><td style="text-align: center;background-color: #FFFF00;;">1</td></tr><tr ><td style="color: #161120;text-align: center;">3</td><td style="text-align: center;background-color: #92D050;;">2</td><td style="text-align: center;background-color: #92D050;;">2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">1</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">1</td><td style="text-align: right;;"></td><td style=";">with blank</td><td style="text-align: center;;">without</td><td style="text-align: center;;">without</td><td style="text-align: center;;">without</td><td style="text-align: center;;">without</td><td style="text-align: center;;">without</td></tr><tr ><td style="color: #161120;text-align: center;">4</td><td style="text-align: center;background-color: #92D050;;">-2</td><td style="text-align: center;background-color: #92D050;;">-2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">2</td><td style="text-align: center;;">0</td><td style="text-align: center;;">1</td><td style="text-align: center;;">1</td><td style="text-align: center;;">1</td><td style="text-align: center;;">1</td><td style="text-align: center;;">0</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: center;;">blank</td><td style="text-align: center;;">blank</td><td style="text-align: center;;">blank</td><td style="text-align: center;;">blank</td><td style="text-align: center;;">blank</td></tr><tr ><td style="color: #161120;text-align: center;">5</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">0</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">2</td><td style="text-align: center;;">2</td><td style="text-align: center;;">2</td><td style="text-align: center;;">2</td><td style="text-align: center;;">2</td><td style="text-align: center;;">0</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">6</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">1</td><td style="text-align: center;;">2</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-1</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">7</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">1</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">1</td><td style="text-align: center;;">2</td><td style="text-align: center;;">0</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">8</td><td style="text-align: center;background-color: #92D050;;">-1</td><td style="text-align: center;background-color: #92D050;;">-1</td><td style="text-align: center;;">0</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">1</td><td style="text-align: center;;">2</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">9</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">0</td><td style="text-align: center;;">2</td><td style="text-align: center;;">2</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-2</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">10</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">0</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">0</td><td style="text-align: center;;">-2</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">11</td><td style="text-align: center;;">0</td><td style="text-align: center;;">2</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">0</td><td style="text-align: center;;">0</td><td style="text-align: center;;">2</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">0</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">12</td><td style="text-align: center;;">0</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">0</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">1</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">0</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">13</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">0</td><td style="text-align: center;;">1</td><td style="text-align: center;;">0</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">0</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-1</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">14</td><td style="text-align: center;background-color: #92D050;;">-1</td><td style="text-align: center;background-color: #92D050;;">-1</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">2</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">0</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">15</td><td style="text-align: center;background-color: #92D050;;">1</td><td style="text-align: center;background-color: #92D050;;">1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">0</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">0</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">2</td><td style="text-align: center;;">0</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">16</td><td style="text-align: center;background-color: #92D050;;"></td><td style="text-align: center;background-color: #92D050;;"></td><td style="text-align: center;;">2</td><td style="text-align: center;;">0</td><td style="text-align: center;;">1</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">2</td><td style="text-align: center;;">2</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">17</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">0</td><td style="text-align: center;;">2</td><td style="text-align: center;;">2</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">2</td><td style="text-align: center;;">1</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">18</td><td style="text-align: center;background-color: #92D050;;">0</td><td style="text-align: center;background-color: #92D050;;">0</td><td style="text-align: center;;">0</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">1</td><td style="text-align: center;;">0</td><td style="text-align: center;;">0</td><td style="text-align: center;;">1</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">19</td><td style="text-align: center;background-color: #92D050;;">-2</td><td style="text-align: center;background-color: #92D050;;">-2</td><td style="text-align: center;;">0</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">-1</td><td style="text-align: center;;">0</td><td style="text-align: center;;">1</td><td style="text-align: center;;">2</td><td style="text-align: center;;">0</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">20</td><td style="text-align: center;;">1</td><td style="text-align: center;;">0</td><td style="text-align: center;;">1</td><td style="text-align: center;;">1</td><td style="text-align: center;;">1</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">-2</td><td style="text-align: center;;">1</td><td style="text-align: center;;">0</td><td style="text-align: center;;">1</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr></tbody></table><p style="width:3.6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #A6AAB6;border-top:none;text-align: center;background-color: #E0E0F0;color: #161120">Sheet1</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: #FFFFFF" ><tr><td style="padding:6px" ><b>Array Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #A6AAB6"><thead><tr style=" background-color: #E0E0F0;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">L2</th><td style="text-align:left">{=SUM(<font color="Blue">--(<font color="Red">A$2:A$20=B$2:B$20</font>)</font>)}</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">M2</th><td style="text-align:left">{=SUM(<font color="Blue">(<font color="Red">A$2:A$20=B$2:B$20</font>)*(<font color="Red">A$2:A$20<>""</font>)</font>)}</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">N2</th><td style="text-align:left">{=SUM(<font color="Blue">(<font color="Red">C$2:C$20=D$2:D$20</font>)*(<font color="Red">C$2:C$20<>""</font>)</font>)}</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">O2</th><td style="text-align:left">{=SUM(<font color="Blue">(<font color="Red">E$2:E$20=F$2:F$20</font>)*(<font color="Red">E$2:E$20<>""</font>)</font>)}</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">P2</th><td style="text-align:left">{=SUM(<font color="Blue">(<font color="Red">G$2:G$20=H$2:H$20</font>)*(<font color="Red">G$2:G$20<>""</font>)</font>)}</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">Q2</th><td style="text-align:left">{=SUM(<font color="Blue">(<font color="Red">I$2:I$20=J$2:J$20</font>)*(<font color="Red">I$2:I$20<>""</font>)</font>)}</td></tr></tbody></table><b>Entered with Ctrl+Shift+Enter.</b> If entered correctly, Excel will surround with curly braces {}.
<b>Note: Do not try and enter the {} manually yourself</b></td></tr></table><br />
Markmzz
 
Upvote 0

Forum statistics

Threads
1,224,592
Messages
6,179,789
Members
452,942
Latest member
VijayNewtoExcel

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