Count Values(0,1,2,3) that hit and Skip with Each Value

CARBOB

Well-known Member
Joined
Jun 6, 2005
Messages
1,870
The formulas in E2-G5 count the number of times the values hit with each value. Formulas in L2-M5 count the number of skips. The formulas may not be working because of the format of B2-D2 which comes from the A2 value. Not an Excel guru, thans for all responses.


CASH 3 GA MID REPUBLICAN-DEMOCRAT NUMBERS .xlsm
ABCDEFGHIJKLM
1Column1ST AST BST CST B2ST C2ST D2PKGMEDMAXAVGSKIPS2
2111121100001110011011111100#NUM!0#REF!  
31011010110112211001010110#NUM!0#REF!  
41111120101220111021011120#NUM!0#REF!  
51120200011001220211211230#NUM!0#REF!  
Sheet3
Cell Formulas
RangeFormula
B2:B5B2=((IF($A2="","",MID(TEXT($A2,"00000000000000000000"),1,1)+0))*1)*1
C2:C5C2=((IF($A2="","",MID(TEXT($A2,"00000000000000000000"),2,1)+0))*1)*1
D2:D5D2=((IF($A2="","",MID(TEXT($A2,"00000000000000000000"),3,1)+0))*1)*1
H2H2=SUMPRODUCT(--($B$2:$B$5=$E$2),--($C$2:$C$5)=$F$2,--($D$2:$D$5=$G2))
I2:I5I2=MEDIAN(L2:X2)
J2:J5J2=MAX(L2:X2)
K2:K5K2=COUNT('[GA 3 MID CN-NCN STR DIGIT MATRIX.xlsx]SKIPSUMS'!$D:$D)/#REF!
L2:M5L2=CHOOSE(IF(N($Y2),IF(COLUMNS(L2:$AD2)=1, 1, IF(COLUMNS(L2:$AD2)<=$Y2,2,3)),3),SMALL(IF($B$2:$B$5405&"@"&$C$2:$C$5405=$V$2&"@"&$X2,ROW($B$2:$B$5405)-ROW($B$2)),1),SUM(SMALL(IF($B$2:$B$5405&"@"&$C$2:$C$5405=$V$2&"@"&$X2,ROW($B$2)),{1,0}+COLUMNS(L2:$AD2)-1)*{1,-1}),"")
H3:H5H3=SUMPRODUCT(--($B$2:$B$1100=$E$2),--($C$2:$C$1100)=$F$2,--($D$2:$D$1100=$G3))
Press CTRL+SHIFT+ENTER to enter array formulas surrounded with curly braces.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
The formulas in E2-G5 count the number of times the values hit with each value. Formulas in L2-M5 count the number of skips. The formulas may not be working because of the format of B2-D2 which comes from the A2 value. Not an Excel guru, thans for all responses.


CASH 3 GA MID REPUBLICAN-DEMOCRAT NUMBERS .xlsm
ABCDEFGHIJKLM
1Column1ST AST BST CST B2ST C2ST D2PKGMEDMAXAVGSKIPS2
2111121100001110011011111100#NUM!0#REF!  
31011010110112211001010110#NUM!0#REF!  
41111120101220111021011120#NUM!0#REF!  
51120200011001220211211230#NUM!0#REF!  
Sheet3
Cell Formulas
RangeFormula
B2:B5B2=((IF($A2="","",MID(TEXT($A2,"00000000000000000000"),1,1)+0))*1)*1
C2:C5C2=((IF($A2="","",MID(TEXT($A2,"00000000000000000000"),2,1)+0))*1)*1
D2:D5D2=((IF($A2="","",MID(TEXT($A2,"00000000000000000000"),3,1)+0))*1)*1
H2H2=SUMPRODUCT(--($B$2:$B$5=$E$2),--($C$2:$C$5)=$F$2,--($D$2:$D$5=$G2))
I2:I5I2=MEDIAN(L2:X2)
J2:J5J2=MAX(L2:X2)
K2:K5K2=COUNT('[GA 3 MID CN-NCN STR DIGIT MATRIX.xlsx]SKIPSUMS'!$D:$D)/#REF!
L2:M5L2=CHOOSE(IF(N($Y2),IF(COLUMNS(L2:$AD2)=1, 1, IF(COLUMNS(L2:$AD2)<=$Y2,2,3)),3),SMALL(IF($B$2:$B$5405&"@"&$C$2:$C$5405=$V$2&"@"&$X2,ROW($B$2:$B$5405)-ROW($B$2)),1),SUM(SMALL(IF($B$2:$B$5405&"@"&$C$2:$C$5405=$V$2&"@"&$X2,ROW($B$2)),{1,0}+COLUMNS(L2:$AD2)-1)*{1,-1}),"")
H3:H5H3=SUMPRODUCT(--($B$2:$B$1100=$E$2),--($C$2:$C$1100)=$F$2,--($D$2:$D$1100=$G3))
Press CTRL+SHIFT+ENTER to enter array formulas surrounded with curly braces.
I am unable to see the complete formula in the skips formula!!! The formula is referencing column Y, which doesn't show!! Please advise, thanks
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,260
Members
449,075
Latest member
staticfluids

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