
西暦を和暦に変換するには、Format関数を使います。
例

たとえば、セルB3の西暦日付を和暦に変換するには、次のように記述します。
Sub GetWareki() Range("D3").Value = Format(Range("B3"), "ggge年m月d日") End Sub
実行結果

comments powered by Disqus
スポンサーリンク
2017年7月9日 (日) 21:00 in Excel , VBA
Sub GetWareki() Range("D3").Value = Format(Range("B3"), "ggge年m月d日") End Sub
スポンサーリンク