|
本帖最后由 我不知道呀 于 2013-4-22 21:10 编辑
139079696 发表于 2013-4-21 23:26
我需要你帮忙,谢谢,麻烦你了
1、多选题显示答案会出问题,只显示一个答案
Sub tt2()
Dim i As Integer
Dim j As Integer
Dim c As Range
For j = 1 To 66
If Sheets("题目输入区").Cells(j, 1).Value Like "[0-9]*" Then
Sheets("题目输入区").Cells(j, 3) = Mid(Sheets("题目输入区").Cells(j, 1), InStr(1, Sheets("题目输入区").Cells(j, 1), " ") + 1, 100)
With Worksheets("题库").Range("a1:a500")
Set c = .Find(Sheets("题目输入区").Cells(j, 3).Value, LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
For i = 1 To Len(c)
If (Mid(c, i, 1) Like "[A-Z a-z ]") Then
Sheets("题目输入区").Cells(j, 4) = Sheets("题目输入区").Cells(j, 4) & Mid(c, i, 1)
End If
Next i
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
End If
Next j
’我在手机上回复你的,没有测试!你试试
End Sub
|
|