2020-05-13から1日間の記事一覧

クリップボード拡張フリーソフト「Clibor」でバックアップ&リストア

右クリックから「全バックアップ」でzipファイル作成。 exeも含めた全てのファイルがはいってるので、これで上書きすれば復活 ネタ元 https://fs-t.biz/archives/2238#a009

ExcelVBAで右隣のセル情報取得

Offset()使う Sub Sample1() Dim FoundCell As Range Set FoundCell = Range("A:A").Find("田中") If Not FoundCell Is Nothing Then MsgBox FoundCell.Offset(0, 1) End If End Sub ネタ元 https://www.moug.net/tech/exvba/0050161.html

ExcelVBAでセルの検索

Sub Sample2() Dim FoundCell As Range ''またはバリアント型(Variant)とする Set FoundCell = Range("A1").CurrentRegion.Find(What:="土屋") If FoundCell Is Nothing Then MsgBox "検索に失敗しました" Else FoundCell.Select End If End Sub ネタ元 http…

vbaで英字+数字/数字+英字の文字から英字だけ取る

数字+英字ならVal()を使うと数字部分だけ取れる Sub Sample1() MsgBox Val("123ABC") End Sub英字+数字ならひっくり返してから数字部分だけとり、Replaceで数字部分だけ消しちゃう dim moji moji = "ABC123" MdgBox Replace(moji, StrReverse(Val(StrReverse…