- ©«¤l
- 44
- ¥DÃD
- 4
- ºëµØ
- 0
- ¿n¤À
- 84
- ÂI¦W
- 0
- §@·~¨t²Î
- winxp
- ³nÅ骩¥»
- sp2
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2016-10-12
- ³Ì«áµn¿ý
- 2021-11-10
|
EXCEL¹Ï§Î¥\¯àÀ³¸Ó°µ¤£¨ì¡A¥u·Q¨ì¥ÎVBA
1. »Ý±N¹Ï§Îªº¤ô¥¶b®y¼Ð¶b¿ï¶µ§ï¬°"¤å¦r®y¼Ð¶b"
2. ¶K¤WVBAµ{¦¡½X, °õ¦æµ{¦¡
Private Sub CommandButton1_Click()
Dim I As Integer, RNG As Range
With Sheet1
Set RNG = .Range(.Cells(1, 1), .Cells(1, 4))
For I = 2 To .Cells.SpecialCells(xlCellTypeLastCell).Row
If .Cells(I, 5) <> 0 Then
Set RNG = Union(RNG, .Range(.Cells(I, 1), .Cells(I, 4)))
End If
Next I
.ChartObjects("¹Ïªí 1").Chart.SetSourceData Source:=Range(RNG.Address)
End With
End Sub |
|