soldierwill
龙龙1004
考虑到用窗体和控件在这里不方便,就用INPUTBOX来代替了 Sub xm() Dim xm$, ys1%, ys%, rn As Range xm = InputBox("请输入要查询的姓名,并输入显示背景颜色代码,例如:张三,1" & vbCr & "红色 绿色 蓝色 黄色 紫色 青色 桔色") xm = Replace(xm, ",", ",") If IsNumeric(Split(xm, ",")(1)) Then If InStr(xm, ",") Then ys1 = Split(xm, ",")(1) Select Case ys1 Case 1 ys = 3 Case 2 ys = 4 Case 3 ys = 5 Case 4 ys = 6 Case 5 ys = 7 Case 6 ys = 8 Case Else ys = 46 End Select End If For Each rn In SUsedRange If Value = Split(xm, ",")(0) Then IColorIndex = ys Next Else MsgBox "输入有误,请重新输入" End IfEnd Sub
Private Sub CommandButton1_Click() TextBText = "" For r = 1 To Range("a655
请把你的情况说明的再具体点
考虑到用窗体和控件在这里不方便,就用INPUTBOX来代替了 Sub xm() Dim xm$, ys1%, ys%, rn As Range xm
1、首先打开需要编辑的Excel表格,右键单击工作表的标签,选择打开“查看代码”。2、然后在弹出来的窗口中点击输入:Sub 删除重复行()Dim xRow As
直接在B列录入公式就能实现B1=IFERROR(MATCH(C1,A:A,0),"不重复")向下填充,在C列输入内容,如果重复了就会显示数字,指出重复数据在A列
优质论文问答问答知识库