箇条書きマクロ・変更可能

2017–07–12 (Wed) 19:12
箇条書きマクロ・変更可能です。
(エクセルで確認したのち修正します)

Public kensaku(14) as string
Sub Macro1()
If kensaku(0)="" then
kensaku(0)="・"
kensaku(1)="●"
kensaku(2)="○"
kensaku(3)="◆"
kensaku(4)="◇"
kensaku(5)="▼"
kensaku(6)="▽"
kensaku(7)="▲"
kensaku(8)="△"
kensaku(9)="□"
kensaku(10)="■"
kensaku(11)="※"
kensaku(12)="◎"
kensaku(13)="☆"
kensaku(14)="★"
End if
End sub

Sub 中点指定無し()
dim nai as integer
For each Target in selection
nai = 0
shiraberu = Left(target,1)
For i = 0 to 14
If shiraberu = kensaku(i) then
Target.value = Replace(Target.value,shiraberu,"・")
else
nai = 1
End if
next
If nai = 1 then
Target.value = "・" & Target.value
End if
Next
End sub

Sub 黒丸指定無し()
dim nai as integer
For each Target in selection
nai = 0
shiraberu = Left(target,1)
For i = 0 to 14
If shiraberu = kensaku(i) then
Target.value = Replace(Target.value,shiraberu,"●")
else
nai = 1
End if
next
If nai = 1 then
Target.value = "●" & Target.value
End if
Next
End sub

Sub 白丸指定無し()
dim nai as integer
For each Target in selection
nai = 0
shiraberu = Left(target,1)
For i = 0 to 14
If shiraberu = kensaku(i) then
Target.value = Replace(Target.value,shiraberu,"○")
else
nai = 1
End if
next
If nai = 1 then
Target.value = "○" & Target.value
End if
Next
End sub


Sub 白ひし形指定無し()
dim nai as integer
For each Target in selection
nai = 0
shiraberu = Left(target,1)
For i = 0 to 14
If shiraberu = kensaku(i) then
Target.value = Replace(Target.value,shiraberu,"◇")
else
nai = 1
End if
next
If nai = 1 then
Target.value = "◇" & Target.value
End if
Next
End sub


Sub 黒ひし形指定無し()
dim nai as integer
For each Target in selection
nai = 0
shiraberu = Left(target,1)
For i = 0 to 14
If shiraberu = kensaku(i) then
Target.value = Replace(Target.value,shiraberu,"◆")
else
nai = 1
End if
next
If nai = 1 then
Target.value = "◆" & Target.value
End if
Next
End sub

Sub 白三角指定無し()
dim nai as integer
For each Target in selection
nai = 0
shiraberu = Left(target,1)
For i = 0 to 14
If shiraberu = kensaku(i) then
Target.value = Replace(Target.value,shiraberu,"△")
else
nai = 1
End if
next
If nai = 1 then
Target.value = "△" & Target.value
End if
Next
End sub


Sub 黒三角指定無し()
dim nai as integer
For each Target in selection
nai = 0
shiraberu = Left(target,1)
For i = 0 to 14
If shiraberu = kensaku(i) then
Target.value = Replace(Target.value,shiraberu,"▲")
else
nai = 1
End if
next
If nai = 1 then
Target.value = "▲" & Target.value
End if
Next
End sub

Sub 逆白三角指定無し()
dim nai as integer
For each Target in selection
nai = 0
shiraberu = Left(target,1)
For i = 0 to 14
If shiraberu = kensaku(i) then
Target.value = Replace(Target.value,shiraberu,"▽")
else
nai = 1
End if
next
If nai = 1 then
Target.value = "▽" & Target.value
End if
Next
End sub


Sub 逆黒三角指定無し()
dim nai as integer
For each Target in selection
nai = 0
shiraberu = Left(target,1)
For i = 0 to 14
If shiraberu = kensaku(i) then
Target.value = Replace(Target.value,shiraberu,"▼")
else
nai = 1
End if
next
If nai = 1 then
Target.value = "▼" & Target.value
End if
Next
End sub


Sub 白四角指定無し()
dim nai as integer
For each Target in selection
nai = 0
shiraberu = Left(target,1)
For i = 0 to 14
If shiraberu = kensaku(i) then
Target.value = Replace(Target.value,shiraberu,"□")
else
nai = 1
End if
next
If nai = 1 then
Target.value = "□" & Target.value
End if
Next
End sub

Sub 黒四角指定無し()
dim nai as integer
For each Target in selection
nai = 0
shiraberu = Left(target,1)
For i = 0 to 14
If shiraberu = kensaku(i) then
Target.value = Replace(Target.value,shiraberu,"■")
else
nai = 1
End if
next
If nai = 1 then
Target.value = "■" & Target.value
End if
Next
End sub

Sub コメ印指定無し()
dim nai as integer
For each Target in selection
nai = 0
shiraberu = Left(target,1)
For i = 0 to 14
If shiraberu = kensaku(i) then
Target.value = Replace(Target.value,shiraberu,"※")
else
nai = 1
End if
next
If nai = 1 then
Target.value = "※" & Target.value
End if
Next
End sub

Sub 二重丸指定無し()
dim nai as integer
For each Target in selection
nai = 0
shiraberu = Left(target,1)
For i = 0 to 14
If shiraberu = kensaku(i) then
Target.value = Replace(Target.value,shiraberu,"◎")
else
nai = 1
End if
next
If nai = 1 then
Target.value = "◎" & Target.value
End if
Next
End sub

Sub 白星指定無し()
dim nai as integer
For each Target in selection
nai = 0
shiraberu = Left(target,1)
For i = 0 to 14
If shiraberu = kensaku(i) then
Target.value = Replace(Target.value,shiraberu,"☆")
else
nai = 1
End if
next
If nai = 1 then
Target.value = "☆" & Target.value
End if
Next
End sub


Sub 黒星指定無し()
dim nai as integer
For each Target in selection
nai = 0
shiraberu = Left(target,1)
For i = 0 to 14
If shiraberu = kensaku(i) then
Target.value = Replace(Target.value,shiraberu,"★")
else
nai = 1
End if
next
If nai = 1 then
Target.value = "★" & Target.value
End if
Next
End sub
スポンサーサイト

« 箇条書きマクロ(段落指定なし) | HOME |  アドイン(作成予定含む) »

コメント

コメントの投稿

 
管理者にだけ表示

 | HOME | 

プロフィール

あゆみ

Author:あゆみ
FC2ブログへようこそ!

最新記事

最新コメント

フリーエリア

月別アーカイブ

カテゴリ

ブロとも申請フォーム

検索フォーム

RSSリンクの表示

リンク