{"id":352,"date":"2024-12-31T04:33:34","date_gmt":"2024-12-30T19:33:34","guid":{"rendered":"https:\/\/hajidai.com\/excel\/2024\/12\/excel%e4%b8%8a%e7%b4%9a%e8%80%85%e5%bf%85%e8%a6%8b%ef%bc%81%e5%8b%95%e7%9a%84%e3%83%95%e3%82%a9%e3%83%bc%e3%83%9e%e3%83%83%e3%83%88%e5%a4%89%e6%8f%9b%e3%83%9e%e3%82%af%e3%83%ad%e3%81%a7%e6%a5%ad\/"},"modified":"2024-12-31T04:33:34","modified_gmt":"2024-12-30T19:33:34","slug":"excel%e4%b8%8a%e7%b4%9a%e8%80%85%e5%bf%85%e8%a6%8b%ef%bc%81%e5%8b%95%e7%9a%84%e3%83%95%e3%82%a9%e3%83%bc%e3%83%9e%e3%83%83%e3%83%88%e5%a4%89%e6%8f%9b%e3%83%9e%e3%82%af%e3%83%ad%e3%81%a7%e6%a5%ad","status":"publish","type":"post","link":"https:\/\/hajidai.com\/excel\/2024\/12\/excel%e4%b8%8a%e7%b4%9a%e8%80%85%e5%bf%85%e8%a6%8b%ef%bc%81%e5%8b%95%e7%9a%84%e3%83%95%e3%82%a9%e3%83%bc%e3%83%9e%e3%83%83%e3%83%88%e5%a4%89%e6%8f%9b%e3%83%9e%e3%82%af%e3%83%ad%e3%81%a7%e6%a5%ad\/","title":{"rendered":"Excel\u4e0a\u7d1a\u8005\u5fc5\u898b\uff01\u52d5\u7684\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u5909\u63db\u30de\u30af\u30ed\u3067\u696d\u52d9\u52b9\u7387\u5316\u3092\u5b9f\u73fe\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<h2>Excel\u4e0a\u7d1a\u8005\u306e\u305f\u3081\u306e\u52d5\u7684\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u5909\u63db\u30de\u30af\u30ed\u5b9f\u88c5\u30ac\u30a4\u30c9<\/h2>\n<h3>\u4e0a\u7d1a\u8005\u5411\u3051\u5373\u52b9\u6027\u30de\u30af\u30ed\u30b3\u30fc\u30c9<\/h3>\n<p>\u4ee5\u4e0b\u306f\u3001\u30bb\u30eb\u5185\u306e\u30c7\u30fc\u30bf\u3092\u81ea\u52d5\u7684\u306b\u6307\u5b9a\u3057\u305f\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u5909\u63db\u3059\u308b\u30de\u30af\u30ed\u30b3\u30fc\u30c9\u3067\u3059\uff1a<\/p>\n<p>&#8220;`vba<br \/>\nSub DynamicFormatConverter()<br \/>\n    Dim cell As Range<br \/>\n    For Each cell In Selection<br \/>\n        Select Case True<br \/>\n            Case IsDate(cell.Value)<br \/>\n                cell.NumberFormat = &#8220;yyyy\/mm\/dd&#8221;<br \/>\n            Case IsNumeric(cell.Value)<br \/>\n                cell.NumberFormat = &#8220;#,##0.00&#8221;<br \/>\n            Case Else<br \/>\n                cell.NumberFormat = &#8220;@&#8221;<br \/>\n        End Select<br \/>\n    Next cell<br \/>\nEnd Sub<br \/>\n&#8220;`<\/p>\n<p>\u3053\u306e\u30de\u30af\u30ed\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u9078\u629e\u3057\u305f\u30bb\u30eb\u7bc4\u56f2\u5185\u306e\u30c7\u30fc\u30bf\u304c\u81ea\u52d5\u7684\u306b\u9069\u5207\u306a\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u5909\u63db\u3055\u308c\u307e\u3059\u3002<\/p>\n<h3>1. \u52d5\u7684\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u5909\u63db\u306e\u91cd\u8981\u6027<\/h3>\n<p>Excel\u4e0a\u7d1a\u8005\u306b\u3068\u3063\u3066\u3001\u52d5\u7684\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u5909\u63db\u30de\u30af\u30ed\u306e\u5b9f\u88c5\u306f\u696d\u52d9\u52b9\u7387\u5316\u306e\u8981\u3068\u306a\u308a\u307e\u3059\u3002\u3053\u306e\u30b9\u30ad\u30eb\u3092\u7fd2\u5f97\u3059\u308b\u3053\u3068\u3067\u3001\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u51e6\u7406\u3084\u8907\u96d1\u306a\u8868\u5f62\u5f0f\u306e\u30ec\u30dd\u30fc\u30c8\u4f5c\u6210\u304c\u683c\u6bb5\u306b\u52b9\u7387\u5316\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u7570\u306a\u308b\u30bd\u30fc\u30b9\u304b\u3089\u53ce\u96c6\u3055\u308c\u305f\u30c7\u30fc\u30bf\u3092\u7d71\u4e00\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u5909\u63db\u3059\u308b\u4f5c\u696d\u3084\u3001\u65e5\u4ed8\u3001\u6570\u5024\u3001\u30c6\u30ad\u30b9\u30c8\u304c\u6df7\u5728\u3059\u308b\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u6574\u7406\u3059\u308b\u969b\u306b\u3001\u624b\u52d5\u3067\u306e\u4f5c\u696d\u304c\u5927\u5e45\u306b\u524a\u6e1b\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u52d5\u7684\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u5909\u63db\u30de\u30af\u30ed\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5229\u70b9\u304c\u3042\u308a\u307e\u3059\uff1a<\/p>\n<p>1. \u30c7\u30fc\u30bf\u5165\u529b\u30df\u30b9\u306e\u524a\u6e1b<br \/>\n2. \u4e00\u8cab\u6027\u306e\u3042\u308b\u30c7\u30fc\u30bf\u8868\u793a<br \/>\n3. \u5206\u6790\u3084\u96c6\u8a08\u4f5c\u696d\u306e\u52b9\u7387\u5316<\/p>\n<h3>2. \u30de\u30af\u30ed\u306e\u69cb\u9020\u3068\u6a5f\u80fd<\/h3>\n<p>\u4e0a\u8a18\u306e\u30de\u30af\u30ed\u30b3\u30fc\u30c9\u306f\u3001\u9078\u629e\u3055\u308c\u305f\u30bb\u30eb\u7bc4\u56f2\u5185\u306e\u5404\u30bb\u30eb\u306b\u5bfe\u3057\u3066\u3001\u305d\u306e\u30c7\u30fc\u30bf\u30bf\u30a4\u30d7\u3092\u5224\u5225\u3057\u3001\u9069\u5207\u306a\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3092\u9069\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>&#8211; IsDate\u95a2\u6570\uff1a\u65e5\u4ed8\u30c7\u30fc\u30bf\u3092\u8b58\u5225\u3057\u3001&#8221;yyyy\/mm\/dd&#8221;\u5f62\u5f0f\u306b\u5909\u63db<br \/>\n&#8211; IsNumeric\u95a2\u6570\uff1a\u6570\u5024\u30c7\u30fc\u30bf\u3092\u8b58\u5225\u3057\u3001\u5343\u5358\u4f4d\u533a\u5207\u308a\u3068\u5c0f\u6570\u70b9\u4ee5\u4e0b2\u6841\u8868\u793a\u306b\u5909\u63db<br \/>\n&#8211; \u305d\u308c\u4ee5\u5916\uff1a\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\u3068\u3057\u3066\u6271\u3044\u3001\u305d\u306e\u307e\u307e\u8868\u793a<\/p>\n<p>\u3053\u306e\u3088\u3046\u306a\u69cb\u9020\u306b\u3088\u308a\u3001\u591a\u69d8\u306a\u30c7\u30fc\u30bf\u30bf\u30a4\u30d7\u306b\u5bfe\u5fdc\u3067\u304d\u308b\u67d4\u8edf\u6027\u304c\u5b9f\u73fe\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>3. \u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3068\u5fdc\u7528<\/h3>\n<p>\u52d5\u7684\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u5909\u63db\u30de\u30af\u30ed\u306f\u3001\u30d3\u30b8\u30cd\u30b9\u30cb\u30fc\u30ba\u306b\u5408\u308f\u305b\u3066\u3055\u3089\u306b\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4f8b\u3048\u3070\uff1a<\/p>\n<p>&#8211; \u901a\u8ca8\u8a18\u53f7\u306e\u8ffd\u52a0<br \/>\n&#8211; \u7279\u5b9a\u306e\u6761\u4ef6\u4e0b\u3067\u306e\u8272\u4ed8\u3051\uff08\u6761\u4ef6\u4ed8\u304d\u66f8\u5f0f\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u7684\u9069\u7528\uff09<br \/>\n&#8211; \u8907\u96d1\u306a\u65e5\u4ed8\u5f62\u5f0f\u3078\u306e\u5bfe\u5fdc\uff08\u4f8b\uff1a\u66dc\u65e5\u306e\u8868\u793a\u8ffd\u52a0\uff09<\/p>\n<p>\u307e\u305f\u3001\u3053\u306e\u30de\u30af\u30ed\u3092\u3055\u3089\u306b\u767a\u5c55\u3055\u305b\u3001\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u5168\u4f53\u306b\u9069\u7528\u3057\u305f\u308a\u3001\u7279\u5b9a\u306e\u5217\u306e\u307f\u306b\u9069\u7528\u3059\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>Excel \u30de\u30af\u30ed\u3092\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u53cd\u5fa9\u7684\u306a\u30bf\u30b9\u30af\u3092\u81ea\u52d5\u5316\u3057\u3001\u30c7\u30fc\u30bf\u51e6\u7406\u306e\u52b9\u7387\u3092\u98db\u8e8d\u7684\u306b\u5411\u4e0a\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4e0a\u7d1a\u8005\u306f\u3001\u3053\u308c\u3089\u306e\u30c6\u30af\u30cb\u30c3\u30af\u3092\u99c6\u4f7f\u3057\u3066\u3001\u3088\u308a\u8907\u96d1\u306a\u30c7\u30fc\u30bf\u7ba1\u7406\u3084\u5206\u6790\u30bf\u30b9\u30af\u306b\u53d6\u308a\u7d44\u3080\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u52d5\u7684\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u5909\u63db\u30de\u30af\u30ed\u306e\u5b9f\u88c5\u306f\u3001Excel\u4e0a\u7d1a\u8005\u304c\u7fd2\u5f97\u3059\u3079\u304d\u91cd\u8981\u306a\u30b9\u30ad\u30eb\u306e\u4e00\u3064\u3067\u3059\u3002\u3053\u306e\u6280\u8853\u3092\u7fd2\u5f97\u3057\u3001\u65e5\u3005\u306e\u696d\u52d9\u306b\u9069\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u4f5c\u696d\u6642\u9593\u306e\u77ed\u7e2e\u3068\u30c7\u30fc\u30bf\u54c1\u8cea\u306e\u5411\u4e0a\u3092\u540c\u6642\u306b\u5b9f\u73fe\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u5e38\u306b\u65b0\u3057\u3044Excel\u30c6\u30af\u30cb\u30c3\u30af\u3084\u30de\u30af\u30ed\u306e\u6d3b\u7528\u6cd5\u3092\u5b66\u3073\u7d9a\u3051\u308b\u3053\u3068\u3067\u3001\u696d\u52d9\u52b9\u7387\u5316\u306e\u53ef\u80fd\u6027\u306f\u7121\u9650\u306b\u5e83\u304c\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Excel\u4e0a\u7d1a\u8005\u306e\u305f\u3081\u306e\u52d5\u7684\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u5909\u63db\u30de\u30af\u30ed\u5b9f\u88c5\u30ac\u30a4\u30c9 \u4e0a\u7d1a\u8005\u5411\u3051\u5373\u52b9\u6027\u30de\u30af\u30ed\u30b3\u30fc\u30c9 \u4ee5\u4e0b\u306f\u3001\u30bb\u30eb\u5185\u306e\u30c7\u30fc\u30bf\u3092\u81ea\u52d5\u7684\u306b\u6307\u5b9a\u3057\u305f\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u5909\u63db\u3059\u308b\u30de\u30af\u30ed\u30b3\u30fc\u30c9\u3067\u3059\uff1a #8220;`vba Sub Dynamic<\/p>\n","protected":false},"author":2,"featured_media":351,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-352","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-advanced"],"_links":{"self":[{"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/posts\/352","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/comments?post=352"}],"version-history":[{"count":0,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/posts\/352\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/media\/351"}],"wp:attachment":[{"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/media?parent=352"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/categories?post=352"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/tags?post=352"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}