- ©«¤l
- 835
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 915
- ÂI¦W
- 16
- §@·~¨t²Î
- Win 10,7
- ³nÅ骩¥»
- 2019,2013,2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2024-11-14
|
¦^´_ 1# queening
§Ú§ä¤£¨ì¨Ï¥Î¤@¯ë¤è¦¡ªº¸Ñªk,
¤£¹LY§ï¨Ï¥Î Excel VBA ˬO¥i¥H«Ü®e©öªº¹F¨ì§Aªº»Ý¨D :
ChkData-a.zip (10.75 KB)
- Private Sub cbCheck_Click()
- Dim icol%, icols%
- Dim sStr$
- Dim lTemp&
- Dim rTar As Range
- Dim vTemp
-
- icol = 0
- Do
- sStr = InputBox("½Ð¿é¤J¤ë¥÷ :", "¬d¸ß¦æµ{", 10210)
- If sStr <> "" Then
- For lTemp = 1 To 12
- If sStr = CStr(Cells(1, lTemp)) Then
- icol = lTemp
- Exit For
- End If
- Next lTemp
- End If
- If icol = 0 Then
- vTemp = MsgBox("§ä¤£¨ì¿é¤Jªº¤ë¥÷¸ê®Æ ©Î ¿é¤Jªº¤ë¥÷À³¬° 10201 ªº§Î¦¡, ¬O§_«·s¿é¤J?", vbOKCancel + vbDefaultButton1)
- If vTemp = vbCancel Then Exit Sub
- End If
- Loop Until icol > 0
-
- sStr = ""
- lTemp = 2
- vTemp = 0
- Do
- If icol = 1 Or Cells(lTemp, icol).MergeArea.Count = 1 Then
- Set rTar = Cells(lTemp, icol)
- Else
- Set rTar = Cells(lTemp, Cells(lTemp, icol + 1).End(xlToLeft).Column)
- End If
- If rTar <> "" Then
- If sStr = "" Then
- sStr = sStr + rTar
- Else
- sStr = sStr & Chr(10) & Chr(10) & rTar
- End If
- End If
- lTemp = lTemp + 1
- icols = Cells(lTemp, Columns.Count).End(xlToLeft).Column
- If icols = 1 And Cells(lTemp, 1) = "" Then vTemp = vTemp + 1
- Loop Until vTemp > 10
- If sStr = "" Then
- MsgBox (Cells(1, icol) & "¤ë ¨S¦³¬d¨ì¥ô¦ó¦æµ{.")
- Else
- MsgBox ("¬d´M¨ì " & Cells(1, icol) & " ¤ë ªº¦æµ{¦p¤U :" & Chr(10) & Chr(10) & sStr)
- End If
- End Sub
½Æ»s¥N½X |
|