- ©«¤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# basarasy
¸Õ¸Õ¬Ý- Sub Ex()
- Dim Rng(1 To 2) As Range, E, R As Variant, C As Variant
- With Sheets("eg.1")
- Set Rng(1) = .[D1:G4]
- Set Rng(2) = .[Q2:R4]
- End With
- For Each E In Rng(2).Rows
- R = Application.Match(E.Cells(1, 1), Rng(1).Columns(1), 0)
- C = Application.Match(E.Cells(1, 2), Rng(1).Rows(1), 0)
- If IsNumeric(C) And IsNumeric(R) Then E.Cells(1, 3) = Rng(1).Cells(C, R)
- Next
- With Rng(2)
- .Cells(.Cells.Count).Offset(1, 1) = "=SUM(" & .Columns(.Columns.Count + 1).Address & ")"
- End With
- End Sub
½Æ»s¥N½X |
|