{"id":496,"date":"2025-01-31T00:33:34","date_gmt":"2025-01-30T15:33:34","guid":{"rendered":"https:\/\/hajidai.com\/excel\/2025\/01\/%e3%80%8cexcel%e4%b8%8a%e7%b4%9a%e8%80%85%e5%bf%85%e8%a6%8b%ef%bc%81%e3%83%9e%e3%82%af%e3%83%ad%e3%81%a7%e5%ae%9f%e7%8f%be%e3%81%99%e3%82%8b3%e3%81%a4%e3%81%ae%e9%9d%a9%e6%96%b0%e7%9a%84%e3%83%87\/"},"modified":"2025-01-31T00:33:34","modified_gmt":"2025-01-30T15:33:34","slug":"%e3%80%8cexcel%e4%b8%8a%e7%b4%9a%e8%80%85%e5%bf%85%e8%a6%8b%ef%bc%81%e3%83%9e%e3%82%af%e3%83%ad%e3%81%a7%e5%ae%9f%e7%8f%be%e3%81%99%e3%82%8b3%e3%81%a4%e3%81%ae%e9%9d%a9%e6%96%b0%e7%9a%84%e3%83%87","status":"publish","type":"post","link":"https:\/\/hajidai.com\/excel\/2025\/01\/%e3%80%8cexcel%e4%b8%8a%e7%b4%9a%e8%80%85%e5%bf%85%e8%a6%8b%ef%bc%81%e3%83%9e%e3%82%af%e3%83%ad%e3%81%a7%e5%ae%9f%e7%8f%be%e3%81%99%e3%82%8b3%e3%81%a4%e3%81%ae%e9%9d%a9%e6%96%b0%e7%9a%84%e3%83%87\/","title":{"rendered":"\u300cExcel\u4e0a\u7d1a\u8005\u5fc5\u898b\uff01\u30de\u30af\u30ed\u3067\u5b9f\u73fe\u3059\u308b3\u3064\u306e\u9769\u65b0\u7684\u30c7\u30fc\u30bf\u54c1\u8cea\u7ba1\u7406\u30c6\u30af\u30cb\u30c3\u30af\u300d"},"content":{"rendered":"<h2>Excel\u4e0a\u7d1a\u8005\u306e\u305f\u3081\u306e\u30de\u30af\u30ed\u306b\u3088\u308b\u30c7\u30fc\u30bf\u54c1\u8cea\u7ba1\u7406\u30c6\u30af\u30cb\u30c3\u30af<\/h2>\n<p>\u4e0a\u7d1a\u8005\u5411\u3051\u306e\u30de\u30af\u30ed\u30b3\u30fc\u30c9\u4f8b\uff1a<br \/>\n&#8220;`vba<br \/>\nSub \u30c7\u30fc\u30bf\u54c1\u8cea\u30c1\u30a7\u30c3\u30af()<br \/>\n    Dim ws As Worksheet<br \/>\n    Dim lastRow As Long<br \/>\n    Dim i As Long<\/p>\n<p>    Set ws = ActiveSheet<br \/>\n    lastRow = ws.Cells(ws.Rows.Count, &#8220;A&#8221;).End(xlUp).Row<\/p>\n<p>    For i = 2 To lastRow<br \/>\n        &#8216; \u30c7\u30fc\u30bf\u306e\u5b58\u5728\u30c1\u30a7\u30c3\u30af<br \/>\n        If IsEmpty(ws.Cells(i, 1)) Then<br \/>\n            ws.Cells(i, 1).Interior.Color = vbYellow<br \/>\n        End If<\/p>\n<p>        &#8216; \u6570\u5024\u7bc4\u56f2\u30c1\u30a7\u30c3\u30af<br \/>\n        If IsNumeric(ws.Cells(i, 2)) Then<br \/>\n            If ws.Cells(i, 2).Value < 0 Or ws.Cells(i, 2).Value > 100 Then<br \/>\n                ws.Cells(i, 2).Interior.Color = vbRed<br \/>\n            End If<br \/>\n        End If<\/p>\n<p>        &#8216; \u65e5\u4ed8\u5f62\u5f0f\u30c1\u30a7\u30c3\u30af<br \/>\n        If Not IsDate(ws.Cells(i, 3)) Then<br \/>\n            ws.Cells(i, 3).Interior.Color = vbBlue<br \/>\n        End If<br \/>\n    Next i<\/p>\n<p>    MsgBox &#8220;\u30c7\u30fc\u30bf\u54c1\u8cea\u30c1\u30a7\u30c3\u30af\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002&#8221;, vbInformation<br \/>\nEnd Sub<br \/>\n&#8220;`<\/p>\n<h3>1. \u30de\u30af\u30ed\u3092\u6d3b\u7528\u3057\u305f\u30c7\u30fc\u30bf\u691c\u8a3c\u306e\u81ea\u52d5\u5316<\/h3>\n<p>Excel \u30de\u30af\u30ed\u3092\u4f7f\u7528\u3057\u305f\u30c7\u30fc\u30bf\u54c1\u8cea\u7ba1\u7406\u306e\u7b2c\u4e00\u306e\u30dd\u30a4\u30f3\u30c8\u306f\u3001\u30c7\u30fc\u30bf\u691c\u8a3c\u30d7\u30ed\u30bb\u30b9\u306e\u81ea\u52d5\u5316\u3067\u3059\u3002\u4e0a\u8a18\u306e\u30de\u30af\u30ed\u30b3\u30fc\u30c9\u306f\u3001\u30c7\u30fc\u30bf\u306e\u5b58\u5728\u30c1\u30a7\u30c3\u30af\u3001\u6570\u5024\u7bc4\u56f2\u30c1\u30a7\u30c3\u30af\u3001\u65e5\u4ed8\u5f62\u5f0f\u30c1\u30a7\u30c3\u30af\u3092\u81ea\u52d5\u3067\u884c\u3044\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3092\u52b9\u7387\u7684\u306b\u691c\u8a3c\u3057\u3001\u4eba\u70ba\u7684\u30df\u30b9\u3092\u6e1b\u3089\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u30de\u30af\u30ed\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u8907\u96d1\u306a\u30eb\u30fc\u30eb\u306b\u57fa\u3065\u3044\u305f\u30c7\u30fc\u30bf\u691c\u8a3c\u3082\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u7279\u5b9a\u306e\u6761\u4ef6\u4e0b\u3067\u306e\u307f\u6709\u52b9\u306a\u30c7\u30fc\u30bf\u3084\u3001\u8907\u6570\u306e\u5217\u306b\u307e\u305f\u304c\u308b\u6574\u5408\u6027\u30c1\u30a7\u30c3\u30af\u306a\u3069\u3082\u3001\u30de\u30af\u30ed\u3092\u4f7f\u3048\u3070\u7c21\u5358\u306b\u5b9f\u88c5\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3055\u3089\u306b\u3001\u691c\u8a3c\u7d50\u679c\u3092\u8996\u899a\u7684\u306b\u8868\u73fe\u3059\u308b\u3053\u3068\u3082\u91cd\u8981\u3067\u3059\u3002\u4e0a\u8a18\u306e\u30de\u30af\u30ed\u3067\u306f\u3001\u554f\u984c\u306e\u3042\u308b\u30bb\u30eb\u306b\u8272\u3092\u4ed8\u3051\u308b\u3053\u3068\u3067\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u7d20\u65e9\u304f\u554f\u984c\u7b87\u6240\u3092\u7279\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>2. \u30c7\u30fc\u30bf\u30af\u30ec\u30f3\u30b8\u30f3\u30b0\u306e\u52b9\u7387\u5316<\/h3>\n<p>Excel \u30de\u30af\u30ed\u3092\u4f7f\u7528\u3057\u305f\u30c7\u30fc\u30bf\u54c1\u8cea\u7ba1\u7406\u306e\u7b2c\u4e8c\u306e\u30dd\u30a4\u30f3\u30c8\u306f\u3001\u30c7\u30fc\u30bf\u30af\u30ec\u30f3\u30b8\u30f3\u30b0\u30d7\u30ed\u30bb\u30b9\u306e\u52b9\u7387\u5316\u3067\u3059\u3002\u30c7\u30fc\u30bf\u30af\u30ec\u30f3\u30b8\u30f3\u30b0\u3068\u306f\u3001\u4e0d\u6b63\u78ba\u306a\u30c7\u30fc\u30bf\u3084\u91cd\u8907\u30c7\u30fc\u30bf\u3092\u4fee\u6b63\u30fb\u524a\u9664\u3057\u3001\u30c7\u30fc\u30bf\u306e\u8cea\u3092\u5411\u4e0a\u3055\u305b\u308b\u30d7\u30ed\u30bb\u30b9\u3092\u6307\u3057\u307e\u3059\u3002<\/p>\n<p>\u30de\u30af\u30ed\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u306b\u5bfe\u3057\u3066\u4e00\u8cab\u3057\u305f\u30af\u30ec\u30f3\u30b8\u30f3\u30b0\u30eb\u30fc\u30eb\u3092\u9069\u7528\u3067\u304d\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u7279\u5b9a\u306e\u6587\u5b57\u5217\u306e\u7f6e\u63db\u3001\u65e5\u4ed8\u5f62\u5f0f\u306e\u7d71\u4e00\u3001\u91cd\u8907\u30c7\u30fc\u30bf\u306e\u524a\u9664\u306a\u3069\u3092\u81ea\u52d5\u5316\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u624b\u4f5c\u696d\u3067\u884c\u3046\u3068\u6642\u9593\u304c\u304b\u304b\u308a\u3001\u30df\u30b9\u3082\u767a\u751f\u3057\u3084\u3059\u3044\u30c7\u30fc\u30bf\u30af\u30ec\u30f3\u30b8\u30f3\u30b0\u4f5c\u696d\u3092\u3001\u8fc5\u901f\u304b\u3064\u6b63\u78ba\u306b\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u30af\u30ec\u30f3\u30b8\u30f3\u30b0\u4f5c\u696d\u306e\u30ed\u30b0\u3092\u81ea\u52d5\u3067\u751f\u6210\u3059\u308b\u3053\u3068\u3067\u3001\u3069\u306e\u3088\u3046\u306a\u30af\u30ec\u30f3\u30b8\u30f3\u30b0\u304c\u884c\u308f\u308c\u305f\u304b\u3092\u5f8c\u304b\u3089\u78ba\u8a8d\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u30c7\u30fc\u30bf\u306e\u8ffd\u8de1\u53ef\u80fd\u6027\u3092\u78ba\u4fdd\u3059\u308b\u4e0a\u3067\u975e\u5e38\u306b\u91cd\u8981\u3067\u3059\u3002<\/p>\n<h3>3. \u5b9a\u671f\u7684\u306a\u30c7\u30fc\u30bf\u54c1\u8cea\u30ec\u30dd\u30fc\u30c8\u306e\u81ea\u52d5\u751f\u6210<\/h3>\n<p>Excel \u30de\u30af\u30ed\u3092\u6d3b\u7528\u3057\u305f\u30c7\u30fc\u30bf\u54c1\u8cea\u7ba1\u7406\u306e\u7b2c\u4e09\u306e\u30dd\u30a4\u30f3\u30c8\u306f\u3001\u5b9a\u671f\u7684\u306a\u30c7\u30fc\u30bf\u54c1\u8cea\u30ec\u30dd\u30fc\u30c8\u306e\u81ea\u52d5\u751f\u6210\u3067\u3059\u3002\u30c7\u30fc\u30bf\u54c1\u8cea\u3092\u7d99\u7d9a\u7684\u306b\u76e3\u8996\u3057\u3001\u6539\u5584\u3057\u3066\u3044\u304f\u305f\u3081\u306b\u306f\u3001\u5b9a\u671f\u7684\u306a\u30ec\u30dd\u30fc\u30c6\u30a3\u30f3\u30b0\u304c\u6b20\u304b\u305b\u307e\u305b\u3093\u3002<\/p>\n<p>\u30de\u30af\u30ed\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u30c7\u30fc\u30bf\u54c1\u8cea\u306b\u95a2\u3059\u308b\u69d8\u3005\u306a\u6307\u6a19\u3092\u81ea\u52d5\u7684\u306b\u8a08\u7b97\u3057\u3001\u30ec\u30dd\u30fc\u30c8\u3068\u3057\u3066\u307e\u3068\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u30a8\u30e9\u30fc\u30c7\u30fc\u30bf\u306e\u5272\u5408\u3001\u30c7\u30fc\u30bf\u306e\u5b8c\u5168\u6027\uff08\u5fc5\u9808\u9805\u76ee\u306e\u5165\u529b\u7387\u306a\u3069\uff09\u3001\u30c7\u30fc\u30bf\u306e\u4e00\u8cab\u6027\uff08\u95a2\u9023\u3059\u308b\u30c7\u30fc\u30bf\u9593\u306e\u6574\u5408\u6027\uff09\u306a\u3069\u306e\u6307\u6a19\u3092\u81ea\u52d5\u8a08\u7b97\u3057\u3001\u30b0\u30e9\u30d5\u3084\u8868\u306b\u307e\u3068\u3081\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u3055\u3089\u306b\u3001\u30ec\u30dd\u30fc\u30c8\u306e\u81ea\u52d5\u30e1\u30fc\u30eb\u9001\u4fe1\u6a5f\u80fd\u3092\u7d44\u307f\u8fbc\u3080\u3053\u3068\u3067\u3001\u95a2\u4fc2\u8005\u306b\u5b9a\u671f\u7684\u306b\u30c7\u30fc\u30bf\u54c1\u8cea\u306e\u72b6\u6cc1\u3092\u5171\u6709\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u7d44\u7e54\u5168\u4f53\u3067\u30c7\u30fc\u30bf\u54c1\u8cea\u306b\u5bfe\u3059\u308b\u610f\u8b58\u3092\u9ad8\u3081\u3001\u7d99\u7d9a\u7684\u306a\u6539\u5584\u306b\u3064\u306a\u3052\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0a\u306e\u3088\u3046\u306b\u3001Excel \u30de\u30af\u30ed\u3092\u6d3b\u7528\u3057\u305f\u30c7\u30fc\u30bf\u54c1\u8cea\u7ba1\u7406\u306f\u3001\u30c7\u30fc\u30bf\u691c\u8a3c\u306e\u81ea\u52d5\u5316\u3001\u30c7\u30fc\u30bf\u30af\u30ec\u30f3\u30b8\u30f3\u30b0\u306e\u52b9\u7387\u5316\u3001\u5b9a\u671f\u7684\u306a\u30ec\u30dd\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u81ea\u52d5\u5316\u3068\u3044\u30463\u3064\u306e\u5074\u9762\u304b\u3089\u3001\u30c7\u30fc\u30bf\u54c1\u8cea\u306e\u5411\u4e0a\u3068\u696d\u52d9\u52b9\u7387\u5316\u306b\u5927\u304d\u304f\u8ca2\u732e\u3057\u307e\u3059\u3002\u30de\u30af\u30ed\u306e\u6d3b\u7528\u306b\u3088\u308a\u3001Excel\u3092\u3088\u308a\u5f37\u529b\u306a\u30c7\u30fc\u30bf\u7ba1\u7406\u30c4\u30fc\u30eb\u3068\u3057\u3066\u6d3b\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u306e\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Excel\u4e0a\u7d1a\u8005\u306e\u305f\u3081\u306e\u30de\u30af\u30ed\u306b\u3088\u308b\u30c7\u30fc\u30bf\u54c1\u8cea\u7ba1\u7406\u30c6\u30af\u30cb\u30c3\u30af \u4e0a\u7d1a\u8005\u5411\u3051\u306e\u30de\u30af\u30ed\u30b3\u30fc\u30c9\u4f8b\uff1a #8220;`vba Sub \u30c7\u30fc\u30bf\u54c1\u8cea\u30c1\u30a7\u30c3\u30af() Dim ws As Worksheet Dim lastRow As L<\/p>\n","protected":false},"author":2,"featured_media":495,"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-496","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\/496","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=496"}],"version-history":[{"count":0,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/posts\/496\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/media\/495"}],"wp:attachment":[{"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/media?parent=496"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/categories?post=496"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/tags?post=496"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}