- ©«¤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# lionliu - Option Explicit
- Sub trnprg()
- Dim myrow As Long
- Dim myrange As Range
- Dim i As Integer
- myrow = Range("a1").End(xlDown).Row
- For i = 2 To myrow
- Set myrange = Cells(i, 1)
- If myrange <> Empty Then
- 'Cells(i, 2).FormulaR1C1 = "=VLOOKUP(" & Cells(1, i) & ",Jsc_Data!A:G,6,FALSE)" '<-¬OR1C1,¦ý¦³A:G
-
- 'FormulaR1C1 ¶Ç¦^©Î³]©wª«¥óªº¤½¦¡¡A¥Î¥¨¶°»y¨¥ªº R1C1 ¼Ë¦¡²Å¸¹ªí¥Ü
- 'Cells(i, 2).FormulaR1C1 = "=VLOOKUP(" & Cells(1, i) & ",Jsc_Data!A:C1:C7,6,FALSE)"
-
- 'Formula ¶Ç¦^©Î³]©w A1 ¼Ë¦¡ªºª«¥ó¤½¦¡
- 'Cells(i, 2).Formula = "=VLOOKUP(" & Cells(1, i) & ",Jsc_Data!A:G,6,FALSE)"
- '
- Cells(i, 2) = "=VLOOKUP(" & Cells(1, i) & ",Jsc_Data!A:G,6,FALSE)" '²³æ¤@ÂI
-
- '¦ý VLOOKUP ¶Ç¦^#N/A ®É Cells(i, 5).FormulaR1C1 ·|¿ù»~
- Cells(i, 5).FormulaR1C1 = "=CONCATENATE(""¥N¹Ô´Ú"", "" - "",Left(""" & Cells(i, 2) & """,2))"
- If Not IsError(Cells(i, 2)) Then Cells(i, 5) = "¥N¹Ô´Ú - " & Left(Cells(i, 2), 2)
- '¦ó¤£§ï¬°¦p¦¹
- End If
- Next i
- Set myrange = Nothing
- End Sub
½Æ»s¥N½X |
|