「★」符号で簡易グラフを作成

 

Sub test()

  ’  符号で簡易グラフを作成
    Dim myR As Range
    Dim m As Long
    Dim n As Long
    
    For Each myR In Range("B2:B7")
        m = Int(myR.Value / 10000)
        n = myR.Value Mod 10000
        myR.Next.Value = String(m, "★") & String(Int(n / 1000), "☆")
    Next
    
End Sub

 

実行結果

 

 

― ― ― ― ― ― ― ― ― ― → Excel VBA基礎入門もくじ へ戻る 

 

参考記事