我在列中有13位字符串数据,我想计算具有唯一位组合的单元格数。该列中的单元格总数为209066.我坚持如何使其成为可能。 因为,2 ^ 13 = 8192个单元,所以也非常忙碌,要在统计上找到唯一的组合,然后在相邻单元格中写入该值发生的次数。
13 Bit String Occurrence
1001111101011
0011111010110
0111110101101
1111101011011
1111010110110
1110101101100
1101011011000
1010110110000
0101101100001
1011011000010
0110110000101
1101100001011
1011000010111
0110000101110
1100001011101
1000010111011
0000101110111
0001011101110
0010111011100
0101110111001
1011101110011
0111011100111
1110111001110
1101110011101
1011100111010
0111001110101
1110011101011
1100111010110
1001110101100
0011101011001
0111010110011
1110101100110
1101011001100
1010110011000
0101100110000
1011001100001
0110011000011
1100110000110
1001100001100
0011000011001
0110000110011
1100001100110
.......
[continued upto cell 209066]
答案 0 :(得分:0)
使用Text to Columns,固定宽度,每个字段的单个字符解析数据。在列A:M中处理副本。然后:
=SUM(A2:M2)
在N2中说:
=COUNTIF(N:N,N2)
在O2中说N2和O2被复制以适应。
答案 1 :(得分:0)
=COUNTIF($A:$A,"="&D1)
`答案 2 :(得分:0)
再次阅读完所有内容后,您可能正在寻找类似的内容:
=SUM(IFERROR(1/COUNTIF(A2:A209066,A2:A209066),0))
这是一个数组公式,必须用 ctrl + shift + 输入确认。
计算范围内唯一的每个值。
但您可能正在寻找不同值的计数:
=IFERROR(IF(MATCH(A2,A:A,0)=ROW(),COUNTIF(A:A,A2),""),"")
这是一个数组公式,必须用 ctrl + shift + 输入确认。
修改强>
如果你只想要计算第一个值,那么这可能是你需要的(B1和复制):
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:drawing="clr-namespace:System.Drawing;assembly=System.Drawing" >
<SolidColorBrush x:Key="BrushSliderEdge" Color="LightGray" />
<SolidColorBrush x:Key="BrushSliderActiveArea" Color="DeepSkyBlue" />
<SolidColorBrush x:Key="BrushSliderThumb" Color="LightSkyBlue" />
<SolidColorBrush x:Key="BrushSliderThumbBorder" Color="DeepSkyBlue" />
<Style x:Key="SliderEdge" TargetType="RepeatButton">
<Setter Property="Focusable" Value="false" />
<Setter Property="IsTabStop" Value="false" />
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="SnapsToDevicePixels" Value="true" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RepeatButton">
<Border Height="3" Background="{StaticResource BrushSliderEdge}" BorderBrush="{StaticResource BrushSliderEdge}" BorderThickness="1" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="SliderInner" TargetType="Thumb">
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="SnapsToDevicePixels" Value="true" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Thumb">
<Border Height="3" Background="{StaticResource BrushSliderActiveArea}" BorderBrush="{StaticResource BrushSliderThumbBorder}" BorderThickness="1" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="SliderThumb" TargetType="Thumb">
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="SnapsToDevicePixels" Value="true" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Thumb">
<Ellipse Width="10" Height="10" Fill="{StaticResource BrushSliderThumb}" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type local:RangeSlider}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:RangeSlider}">
<StackPanel Name="PART_RangeSliderContainer" Orientation="Horizontal">
<RepeatButton Name="PART_LeftEdge" Style="{StaticResource SliderEdge}" />
<Thumb Name="PART_LeftThumb" Cursor="SizeWE" Style="{StaticResource SliderThumb}" />
<Thumb Name="PART_MiddleThumb" MinWidth="10" Cursor="ScrollAll" Style="{StaticResource SliderInner}" />
<Thumb Name="PART_RightThumb" Cursor="SizeWE" Style="{StaticResource SliderThumb}" />
<RepeatButton Name="PART_RightEdge" Style="{StaticResource SliderEdge}" />
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
(这次没有数组公式);)