㈠ 长沙宇菱电梯有限公司岳阳分公司怎么样
简介:长沙宇菱电梯有限公司岳阳分公司成立于2014年03月18日,主要经营范围为从事隶属公司经营范围内的业务联系等。
法定代表人:巢利
成立时间:2014-03-18
工商注册号:430602000040214
企业类型:有限责任公司分公司(自然人投资或控股)
公司地址:湖南省岳阳市岳阳楼区巴陵中路巴陵尚都小区1栋1012室
㈡ 长沙宇菱电梯有限公司怎么样
简介:长沙宇菱电梯有限公司成立于2008年11月24日,主要经营范围为电梯、制冷设备的销售等。
法定代表人:韩卫群
成立时间:2008-11-24
注册资本:510万人民币
工商注册号:430102000077090
企业类型:有限责任公司(自然人投资或控股)
公司地址:长沙市芙蓉区车站北路70号万象新天公寓5栋2413房
㈢ 怎么在excel表格里找出所有未知的相同的字段
为了查找正确,首先,你必须要把筛选的数据放在A列,从第一行开始放。然后,alt+F11调出vba窗口,插入模块,拷贝下面的代码后保存。
运行宏SearchSame,在B列出现的数据是重复项关键字,C列往后就是和该关键字有重复的原始数据。因为excel有列限制,所以结果最多显示到IV列。不过想必够用了吧。
用你给的数据,代码运行正常,你可以试一下。
Sub SearchSame()
Dim pos As Integer
Dim bit As Integer
Dim cellstr As String
Dim keystr As String
Dim len_str As Integer
Dim foundnum As Long
On Error GoTo err
foundnum = 0
ActiveSheet.Range("B:IV").Clear
For Each cell In ActiveSheet.Range("A:A").Cells
cellstr = Trim(cell.Value)
len_str = Len(cellstr)
If cellstr = vbNullString Then
Exit For
End If
For pos = 1 To len_str
For bit = 1 To len_str - pos + 1
keystr = Mid(cell.Value, pos, bit)
If Not HasFound(keystr) Then
If IsSame(keystr, cell.Row) Then
foundnum = foundnum + 1
Cells(foundnum, 2).Value = keystr
Call GetSameData(keystr, foundnum)
End If
End If
Next
Next
Next
err:
End Sub
Private Function IsSame(str As String, idx As Long) As Boolean
Dim found As Boolean
Dim cell
On Error GoTo err
found = False
For Each cell In ActiveSheet.Range("A:A").Cells
If Trim(cell.Value) = vbNullString Then
Exit For
End If
If cell.Row <> idx Then
If cell.Value Like "*" & str & "*" Then
found = True
Exit For
End If
End If
Next
IsSame = found
err:
End Function
Private Function HasFound(str As String) As Boolean
Dim found As Boolean
On Error GoTo err
found = False
For Each cell In ActiveSheet.Range("B:B").Cells
If cell.Value = vbNullString Then
Exit For
End If
If cell.Value = str Then
found = True
Exit For
End If
Next
HasFound = found
err:
End Function
Private Sub GetSameData(str As String, idx As Long)
Dim col As Integer
Dim cell
On Error GoTo err
col = 3
For Each cell In ActiveSheet.Range("A:A").Cells
If col = 256 Or Trim(cell.Value) = vbNullString Then
Exit For
End If
If cell.Value Like "*" & str & "*" Then
Cells(idx, col).Value = cell.Value
col = col + 1
End If
Next
err:
End Sub