>即時新聞-熱門

2008年10月6日星期一

EXCEL - VBA 個人巨集活頁簿

Sub 插入欄()
ActiveCell.Offset(0, 1).Select
Selection.EntireColumn.Insert
Selection.EntireColumn.Insert
ActiveCell.Offset(0, -1).Select
End Sub
Sub 切割()
x = ActiveCell.Address
Selection.TextToColumns Destination:=Range(x), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:="/", FieldInfo:=Array(Array(1, 2), Array(2, 2), Array(3, 2)), _
TrailingMinusNumbers:=True

End Sub
Sub 執行轉換()
插入欄
切割
合併
刪除欄
End Sub
Sub 刪除欄()
ActiveCell.Offset(0, 1).Select
Selection.EntireColumn.Delete
Selection.EntireColumn.Delete
ActiveCell.Offset(0, -1).Select
End Sub

Sub 合併()

x = ActiveCell.Value

If Int(x) >= 100 Then

x = Int(ActiveCell.Value) + 1911 & "/" & Int(ActiveCell.Offset(0, 1).Value) & "/" & Int(ActiveCell.Offset(0, 2).Value)
ActiveCell.Value = x

Else
x = Int(ActiveCell.Offset(0, 2).Value) + 11 & "/" & Int(ActiveCell.Value) & "/" & Int(ActiveCell.Offset(0, 1).Value)
ActiveCell.Value = x


End If

End Sub

9 评论:

匿名 说...

Howdy! I simply would like to give a huge thumbs
up for the nice data you will have here on this post.
I will probably be coming again to your blog for more soon.


Look into my page ... semi auto airsoft rifle uk

匿名 说...

Good day! I just would like to give an enormous thumbs up for the good
information you have got here on this post. I might be
coming back to your blog for more soon.

Feel free to surf to my web site ... semolina durum wheat pasta

匿名 说...

Hi there! I simply want to give a huge thumbs up for the great info you could have here on this post.
I can be coming back to your weblog for extra soon.

My blog - seoul korea travel guide

匿名 说...

Hey! I simply wish to give an enormous thumbs up for the good information you have got here on
this post. I shall be coming back to your weblog for more soon.


Also visit my webpage :: seminole county clerk of circuit court fl

匿名 说...

Howdy! I simply want to give an enormous thumbs up
for the nice info you will have here on this
post. I might be coming again to your blog for more soon.


My web blog :: semo portal edu

匿名 说...

Hello! I just wish to give a huge thumbs up for the good data you have here on this post.
I will likely be coming again to your blog for extra soon.

Feel free to surf to my blog; seminole county community college oviedo

匿名 说...

Hello! I simply would like to give a huge thumbs up
for the great data you could have right here on this post.
I will be coming back to your blog for extra soon.

My blog :: free seo tools search engine

匿名 说...

Hello! I simply want to give an enormous thumbs up for the nice information you may have here on this post.
I might be coming again to your weblog for more soon.

Here is my web blog seoul garden restaurant cleveland

匿名 说...

Hiya! I just want to give a huge thumbs up for the good info you will have here on this post.
I might be coming back to your weblog for more soon.

My webpage semester at sea 2013 itinerary

 
妹咕數位學園歡迎網友們來信指教 妹咕信箱