比较数字vba excel [英] Comparing numbers vba excel

查看:66
本文介绍了比较数字vba excel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello


a small
table
带数字


< span title ="לחץלתרגומיםחלופיים">
a large
table
有很多
数字

应该寻找
a序列
four
numbers(
< span title ="לחץלתרגומיםחלופיים">一个
之后

equal
to four
数字和

table


附件
my
经验

Hello
Has a small table with numbers.
And a large table with lots of numbers.
Should look for a sequence of four numbers (one after the other) to be equal to four numbers and the small table.
Attached is my experience

Sub wewettttttttttttttttttttttt()

Dim i,j As Integer

i = 0

j = 0

i = 1至2500'ùåø ;ä'

t = t + 1

 对于j = 1到30



If Cells(178,5).Value = Cells(i,13).Value And _
$
 单元格(179,5).Value = Cells(i + 1,13).Value和_

 单元格(1180,5).Value = Cells(i + 2,13).Value Then   '


If Cells(178, 5).Value = Cells(i, 13).Value And _
 Cells(179, 5).Value = Cells(i + 1, 13).Value And _
  Cells(1180, 5).Value = Cells(i + 2, 13).Value Then   '

细胞(i,13)。复制细胞(5,20)

细胞(i + 1,13)。复制细胞(6,20)

细胞(i + 2,13)。复制细胞(7,20)

'细胞(i-1,13)。复制细胞(9,20)

Cells(i, 13).Copy Cells(5, 20)
Cells(i + 1, 13).Copy Cells(6, 20)
Cells(i + 2, 13).Copy Cells(7, 20)
'Cells(i - 1, 13).Copy Cells(9, 20)

ElseIf Cells(178,5)= Cells(i,13)然后'j

'细胞(i,13)。复制细胞(8,20)

ElseIf Cells(178, 5) = Cells(i, 13) Then 'j
'Cells(i, 13).Copy Cells(8, 20)



单元格(2,33)= t

单元格(2,34)= i

单元格(2,35)= j

单元格(4,35)=单元格(178,6)


Cells(2, 33) = t
Cells(2, 34) = i
Cells(2, 35) = j
Cells(4, 35) = Cells(178, 6)



结束如果

下一个

下一步


End If
Next
Next

结束次

推荐答案

 

此论坛区域'通常' '打算用于VB.Net问题。

This forum area is 'usually' intended for VB.Net questions.

 

请尝试VBA区域:>>

Please try the VBA area:>>

http://social.msdn.microsoft.com/Forums/en/isvvba/threads

answers :>>

This EXCEL area on answers :>>

http://answers.microsoft.com/en-us/office/forum/excel

 

上的EXCEL区域 social.technet :>>

and the EXCEL area on social.technet :>>

http ://social.technet.microsoft.com/Forums/en/excel/threads

 

最后,这里也是VBA上的一个外部(独立论坛)区域:>>

Finally, here is an external ( independent forum ) area on VBA too:>>

http:// www.programmersheaven.com/mb/vba/Board.aspx

 


这篇关于比较数字vba excel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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