- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 1# OsakaKYC
¸Õ¸Õ¬Ý- Option Explicit
- Sub Ex()
- Dim D As Object, S As Variant, i As Integer
- Dim xSum As Single, E As Range, Msg As String
- Dim ®Æ¸¹ As String
- Set D = CreateObject("scripting.dictionary") '¦r¨åª«¥ó
- With Sheets("¦¨¥»")
- i = 2
- Do While .Cells(i, "B") <> "" '®Æ¸¹Äæ
- D(Trim(.Cells(i, "B"))) = .Cells(i, "C").Value '®Æ¸¹ªº¦¨¥»
- i = i + 1
- Loop
- End With
- For Each E In Sheets("2014¦~ºûשú²Ó").UsedRange.Columns("B:C").Cells
- If E.NoteText <> "" Then
- xSum = 0
- S = Split(Trim(E.NoteText), vbLf)
- For i = 1 To UBound(S)
- If Len(S(i)) > 0 Then
- ®Æ¸¹ = Trim(Split(S(i), "*")(0))
- If D.EXISTS(®Æ¸¹) = False Then '®Æ¸¹¤£¦s¦b
- Msg = Msg & vbLf & Trim(Split(S(i), "*")(0))
- End If
- xSum = xSum + (D(®Æ¸¹) * Val(Split(S(i), "*")(1))) '¦¨¥»²Öp
- End If
- Next
- E = xSum
- End If
- Next
- If Msg <> "" Then MsgBox Msg, , "®Æ¸¹¤£¦s¦b"
- End Sub
½Æ»s¥N½X |
|