- ©«¤l
- 29
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 32
- ÂI¦W
- 0
- §@·~¨t²Î
- windows 7
- ³nÅ骩¥»
- ±M·~ª©
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2014-3-31
- ³Ì«áµn¿ý
- 2014-7-10
|
[µo°Ý] ~ µo²{¤@Ó·sªº°ÝÃD Ãö©óIF§PÂ_¦¡
¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-5-22 16:40 ½s¿è
§Ú³Ìªñ¤S«·s±Nµ{¦¡®³¥X¨Ó½m²ß¡A쥻§PÂ_¦¡¬O§PÂ_B10»PB12¡A
§Úµo²{¦pªG¤µ¤Ñ§Ú·Qn¦h§PÂ_C10»PC12¡A¬Æ¦ÜD10»PD12¡A¤£ª¾¹D¸Ó±qþÃä´¡¤JIF§PÂ_¦¡¡A
For Each E In Sh.Range("B8,B10") ³oÃä¦n¹³¨S¿ìªkª½±µ§ï¦¨ For Each E In Sh.Range("B8,B10,C10,C12")
¦³¿ìªk¯à¦h§PÂ_C10»PC12¶Ü??
¥I¤Wì©«ªº³sµ² http://forum.twbts.com/viewthrea ... p;extra=&page=3
ª©¥Dµ¹ªºµ{¦¡½X
Dim NewRow As Integer, E As Range, Sh As Worksheet
Set Sh = Worksheets("4-¤u§@¤é»xOP COA AGR")
For Each E In Sh.Range("B10,B12")
If E.Address = "$B$10" Then
NewRow = Sh.Range("J34").Value
Else
NewRow = Sh.Range("J35").Value
End If
With Worksheets(E.Value)
.Cells(NewRow, 1) = Sh.Range("C7")
.Cells(NewRow, 2) = Sh.Range("C8").Value
.Cells(NewRow, 3) = Sh.Range("I14").Value
.Cells(NewRow, 4) = Sh.Range("I15").Value
.Cells(NewRow, 6) = Sh.Range("G24").Value
If E.Address = "$B$10" Then
.Cells(NewRow, 7) = Sh.Range("H32")
.Cells(NewRow, 5) = Sh.Range("J10").Value
Sh.Range("J34") = NewRow
Else
.Cells(NewRow, 7) = Sh.Range("H34")
.Cells(NewRow, 5) = Sh.Range("J12").Value
Sh.Range("J35") = NewRow
End If
End With
Next
MsgBox "New Data added", vbOKOnly, "Data"
End Sub |
|