- ©«¤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
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-11-29 09:57 ½s¿è
¦^´_ 3# stevenliu555
¤u§@ªíVLookupªº½d³òn¥ÎDouble(Âùºë«×¯BÂI¼Æ)
쥻µ{¦¡¤¤ iLo_St_Ret(2 To 241, 1 To 5) As Single(³æºë«×¯BÂI¼Æ) ,¬O©Ò³y¦¨ªº¿ù»~ªºì¦]- Sub MainProgram()
- 'Dim iWi_St_Ret(2 To 241, 1 To 5), iLo_St_Ret(2 To 241, 1 To 5) As Single '¥u¦³iLo_St_Ret¦³«ü©w«¬ºA
- 'Dim iWi_St_Ret_Perf(2 To 241, 1 To 5) As Single, iLo_St_Ret_Perf(2 To 241, 1 To 5) As Single '³£¦³«ü©w«¬ºA
- Dim iWi_St_Ret() As Double 'Âùºë«×¯BÂI¼Æ
- Dim iLo_St_Ret() As Double '() °ÊºA°}¦C
- Dim iWi_St_Ret_Perf() As Double
- Dim iLo_St_Ret_Perf() As Double
- Dim i, j, k, n As Integer
- Dim c, r As Integer
- Dim data As Range
- iRowNo = Sheets("Ӫѳø¹S²v").Range("A65536").End(xlUp).Row
- iColumnNo = Sheets("Ӫѳø¹S²v").Range("HV1").End(xlToLeft).Column
- 'ReDim ³¯z¦¡ ¦bµ{§Ç¼h¦¸¤¤¥Î¨Ó«·s°t¸m°ÊºA°}¦CÅܼƪºÀx¦sªÅ¶¡¡C
- ReDim iWi_St_Ret(2 To iColumnNo, 1 To 5)
- ReDim iLo_St_Ret(2 To iColumnNo, 1 To 5)
- ReDim iWi_St_Ret_Perf(2 To iColumnNo, 1 To 5)
- ReDim iLo_St_Ret_Perf(2 To iColumnNo, 1 To 5)
- For j = 2 To iColumnNo
- For i = 1 To 5
- 'iWi_St_Ret_Perf(j, i) = 0 '¤£¥²¬°0
- 'iLo_St_Ret_Perf(j, i) = 0
- Debug.Print iWi_St_Ret(j, i)
- iWi_St_Ret(j, i) = Application.WorksheetFunction.Large(Range(Cells(2, j), Cells(iRowNo, j)), i)
- iLo_St_Ret(j, i) = Application.WorksheetFunction.Small(Range(Cells(2, j), Cells(iRowNo, j)), i)
- 'Set data = Range(Cells(j, 2), Cells(100, j + 1)) '¥t¤@¿ù»~ÂI Cells(j, 2)=>¤@ª½¬OBÄæ
- 'Set data = Range(Cells(2, j), Cells(100, j + 1)) 'Äæ¦ìÀHµÛj
- Set data = Range(Cells(2, j), Cells(iRowNo, j + 1)) '«Øij¦C¦ì¥Î iRowNo
- 'Debug.Print data.Address '¥i¬Ý¬Ý½d³ò
- iWi_St_Ret_Perf(j, i) = Application.VLookup(iWi_St_Ret(j, i), data, 2, False)
- iLo_St_Ret_Perf(j, i) = Application.VLookup(iLo_St_Ret(j, i), data, 2, False)
- Next i
- Next j
- End Sub
½Æ»s¥N½X |
|