具有相同结尾的数字的重复性 [英] repetitiveness of numbers with the same ending

查看:98
本文介绍了具有相同结尾的数字的重复性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!

你好吗?

我想知道用相同的结尾计算所有可能数字的频率/重复次数(这样做)从0到1的所有结局每行

例如:

a行:65 67 10 20 51 55 68 35 69 75 79 80 84 85 90 95 30 40 98

结束频率0:7

结束频率1:1

结束频率2: 0

频率结束3:0

结束频率4:1

结束频率5:6

结束频率6:0

频率结束7:0

频率结束8:2

结束频率9:2


行b:05 12 94 77 56 62 74 97 55 10 23 85 60 26 68 99


结束频率0:2

结束频率1:0

结束频率2:2

频率结束3:0

频率结束4:2

频率结束5:3

频率结束6:2

结束频率7:2

频率结束8:1

频率结束9:1
等等...对于c行,d行,e行.......

我想这样,计算每行的频率/重复次数,以获得像excel这样的电子表格中的大量列表。


每行中的数字可能不按照上面列出的顺序发生,可能以不同的顺序出现,数字顺序不相关。 (05,12,94,77,56,62,74,97,55,10,23,85,60,26,68,99)与(99,68,60,26,23,85)相同,10,55,97,74,62,56,77,94,12,05)。


我想知道'有可能在visual basic / excel中做到这一点但是我不知道怎么开始。

我的视觉基础是6.3


有人可以伸出手吗?


我很期待收到好消息。


提前谢谢

解决方案

这可以是用Excel在Excel中完成。

我有一个问题:数字是如何呈现的:我的意思是:它是在文本文件中吗?如果是这样,什么是分隔符(空格,逗号,......)还是在Excel文件中?


是否可以在BYTES中附加有限的示例以便我们可以直接在一个很好的例子上工作(行的不同可能性=长度有差异吗?)?


方法将是:

- 如果它在TXT文件中,读取数组中的行并在第二个数组中分割下摆。

- 查找每个数字的最后一位数,计算它们并将结果放在一个数组中。

- 将最后一个数组转储到工作表中。


我很乐意帮助你


我在想这有可能在visual basic / excel中实现,但我不知道如何开始。

我的视觉基础是6.3

我想这个,计算excel等电子表格中巨大数字列表的每一行的频率/重复次数。请参阅附件作为极大数量列表的示例


您能提供一些帮助吗?

提前付款





附加文件
(37.8 KB,31 views)


hello guys!
how are you?
I''d like to know to calculate the frequency/repetition of all possible numbers with the same ending (doing this for all endings from 0 to 1) for each line
for example:
line a:65 67 10 20 51 55 68 35 69 75 79 80 84 85 90 95 30 40 98
frequency of ending 0: 7
frequency of ending 1: 1
frequency of ending 2: 0
frequency of ending 3: 0
frequency of ending 4: 1
frequency of ending 5: 6
frequency of ending 6: 0
frequency of ending 7: 0
frequency of ending 8: 2
frequency of ending 9: 2

line b: 05 12 94 77 56 62 74 97 55 10 23 85 60 26 68 99

frequency of ending 0: 2
frequency of ending 1: 0
frequency of ending 2: 2
frequency of ending 3: 0
frequency of ending 4: 2
frequency of ending 5: 3
frequency of ending 6: 2
frequency of ending 7: 2
frequency of ending 8: 1
frequency of ending 9: 1
and so on... for line c , line d, line e, ... .
I′d like to this, to calculate the frequency/repetition for each line for a huge number list in a spreadsheet like excel.

The numbers in each line may not be happened in sequence order as present above, may appear in different order, numbers order is not relevant. (05, 12, 94, 77, 56, 62, 74, 97, 55, 10, 23, 85, 60, 26 ,68, 99 ) is the same set as (99,68,60,26,23,85,10,55,97,74,62,56,77,94,12,05).

I was wondering that''s possible to make this in visual basic/ excel but I don′t know how to start.
My visual basic is 6.3

Can someone give a hand??

I''m looking forward to receiving good news.

Thanks in advance

解决方案

This can be done in Excel with VBA.
I have a question: how are the numbers presented: I mean: is it in a textfile ? and if so, what are the delimiters (space, comma,...) or is it in an Excel file?

Is it possible to attach an limited example in BYTES so we can work directly on a good example (with the different possibilities of lines = is there a difference in length ?)?

The method will be:
- If it''s in a TXT file, read the lines in an array and split hem in a second array.
- Find the last digit in each number, count them and place the result in an array.
- Dump the last array in a sheet.

I will be glad to help You


I was wondering that''s possible to make this in visual basic/ excel but I don′t know how to start.
My visual basic is 6.3
I′d like to this, to calculate the frequency/repetition for each line for a huge number list in a spreadsheet like excel. See the attachment as example for a extremely large number list

Can you give some help??
Thanks in advance

Attached Files
EXAMPL.zip (31.3 KB, 49 views)


Run the macro "FrequentyLastNumber" (see attachment).
It will place the columns F-0 to F-9 and the frequenties of the last digit in each datacell.

Attached Files
repetitiveness of numbers with the same ending_v1.0.zip (37.8 KB, 31 views)


这篇关于具有相同结尾的数字的重复性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆