{"id":666,"date":"2025-06-04T08:49:10","date_gmt":"2025-06-03T23:49:10","guid":{"rendered":"https:\/\/hajidai.com\/excel\/2025\/06\/%e3%80%90%e4%b8%8a%e7%b4%9a%e8%80%85%e5%bf%85%e8%a6%8b%e3%80%91excel%e3%83%9e%e3%82%af%e3%83%ad%e3%81%a7%e4%bd%9c%e3%82%8b%e9%9d%a9%e6%96%b0%e7%9a%84%e3%83%87%e3%83%bc%e3%82%bf%e6%a4%9c%e8%a8%bc\/"},"modified":"2025-06-04T08:49:10","modified_gmt":"2025-06-03T23:49:10","slug":"%e3%80%90%e4%b8%8a%e7%b4%9a%e8%80%85%e5%bf%85%e8%a6%8b%e3%80%91excel%e3%83%9e%e3%82%af%e3%83%ad%e3%81%a7%e4%bd%9c%e3%82%8b%e9%9d%a9%e6%96%b0%e7%9a%84%e3%83%87%e3%83%bc%e3%82%bf%e6%a4%9c%e8%a8%bc","status":"publish","type":"post","link":"https:\/\/hajidai.com\/excel\/2025\/06\/%e3%80%90%e4%b8%8a%e7%b4%9a%e8%80%85%e5%bf%85%e8%a6%8b%e3%80%91excel%e3%83%9e%e3%82%af%e3%83%ad%e3%81%a7%e4%bd%9c%e3%82%8b%e9%9d%a9%e6%96%b0%e7%9a%84%e3%83%87%e3%83%bc%e3%82%bf%e6%a4%9c%e8%a8%bc\/","title":{"rendered":"\u3010\u4e0a\u7d1a\u8005\u5fc5\u898b\u3011Excel\u30de\u30af\u30ed\u3067\u4f5c\u308b\u9769\u65b0\u7684\u30c7\u30fc\u30bf\u691c\u8a3c\u30a8\u30f3\u30b8\u30f3\uff1a\u696d\u52d9\u52b9\u7387\u3092\u5287\u7684\u306b\u5411\u4e0a\u3055\u305b\u308b\u65b9\u6cd5"},"content":{"rendered":"<h2>\u4e0a\u7d1a\u8005\u5411\u3051Excel\u30de\u30af\u30ed: \u30c7\u30fc\u30bf\u691c\u8a3c\u30a8\u30f3\u30b8\u30f3\u306e\u958b\u767a<\/h2>\n<p>Excel\u3092\u4f7f\u3044\u3053\u306a\u3057\u3066\u3082\u3063\u3068\u697d\u3092\u3057\u305f\u3044\u3001\u696d\u52d9\u3092\u52b9\u7387\u5316\u3057\u305f\u3044\u4e0a\u7d1a\u8005\u306e\u65b9\u306b\u3001\u3059\u3050\u306b\u8a66\u305b\u308b\u30de\u30af\u30ed\u30b3\u30fc\u30c9\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002\u3053\u306e\u30b3\u30fc\u30c9\u306f\u3001\u30ab\u30b9\u30bf\u30e0\u30c7\u30fc\u30bf\u691c\u8a3c\u30a8\u30f3\u30b8\u30f3\u306e\u57fa\u790e\u3068\u306a\u308b\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>&#8220;`vba<br \/>\nSub CustomDataValidation()<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        If Not IsNumeric(ws.Cells(i, &#8220;B&#8221;).Value) Then<br \/>\n            ws.Cells(i, &#8220;C&#8221;).Value = &#8220;\u30a8\u30e9\u30fc: \u6570\u5024\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044&#8221;<br \/>\n        ElseIf ws.Cells(i, &#8220;B&#8221;).Value < 0 Or ws.Cells(i, \"B\").Value > 100 Then<br \/>\n            ws.Cells(i, &#8220;C&#8221;).Value = &#8220;\u30a8\u30e9\u30fc: 0\u304b\u3089100\u306e\u9593\u306e\u5024\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044&#8221;<br \/>\n        Else<br \/>\n            ws.Cells(i, &#8220;C&#8221;).Value = &#8220;OK&#8221;<br \/>\n        End If<br \/>\n    Next i<br \/>\nEnd Sub<br \/>\n&#8220;`<\/p>\n<p>\u3053\u306e\u30de\u30af\u30ed\u306f\u3001B\u5217\u306e\u5404\u30bb\u30eb\u306e\u5024\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3001\u6570\u5024\u3067\u306a\u3044\u5834\u5408\u30840\u304b\u3089100\u306e\u7bc4\u56f2\u5916\u306e\u5834\u5408\u306b\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n<h3>1. \u30ab\u30b9\u30bf\u30e0\u30c7\u30fc\u30bf\u691c\u8a3c\u30a8\u30f3\u30b8\u30f3\u306e\u91cd\u8981\u6027<\/h3>\n<p>Excel\u306e\u30c7\u30fc\u30bf\u691c\u8a3c\u6a5f\u80fd\u306f\u4fbf\u5229\u3067\u3059\u304c\u3001\u8907\u96d1\u306a\u30eb\u30fc\u30eb\u3084\u6761\u4ef6\u3092\u8a2d\u5b9a\u3059\u308b\u5834\u5408\u306b\u306f\u9650\u754c\u304c\u3042\u308a\u307e\u3059\u3002\u30ab\u30b9\u30bf\u30e0\u30c7\u30fc\u30bf\u691c\u8a3c\u30a8\u30f3\u30b8\u30f3\u3092\u958b\u767a\u3059\u308b\u3053\u3068\u3067\u3001\u3088\u308a\u67d4\u8edf\u3067\u9ad8\u5ea6\u306a\u30c7\u30fc\u30bf\u30c1\u30a7\u30c3\u30af\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u8907\u6570\u306e\u5217\u306b\u307e\u305f\u304c\u308b\u30c7\u30fc\u30bf\u306e\u6574\u5408\u6027\u30c1\u30a7\u30c3\u30af\u3084\u3001\u5916\u90e8\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3068\u306e\u7167\u5408\u306a\u3069\u3001\u6a19\u6e96\u306e\u30c7\u30fc\u30bf\u691c\u8a3c\u3067\u306f\u96e3\u3057\u3044\u51e6\u7406\u3082\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>Excel\u30de\u30af\u30ed\u3092\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u3053\u308c\u3089\u306e\u9ad8\u5ea6\u306a\u691c\u8a3c\u30eb\u30fc\u30eb\u3092\u81ea\u52d5\u5316\u3057\u3001\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3092\u52b9\u7387\u7684\u306b\u51e6\u7406\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u307e\u305f\u3001\u30a8\u30e9\u30fc\u306e\u691c\u51fa\u3060\u3051\u3067\u306a\u304f\u3001\u4fee\u6b63\u3084\u8b66\u544a\u306e\u8868\u793a\u306a\u3069\u3082\u81ea\u52d5\u5316\u3067\u304d\u308b\u305f\u3081\u3001\u30c7\u30fc\u30bf\u5165\u529b\u8005\u306e\u8ca0\u62c5\u3092\u5927\u5e45\u306b\u8efd\u6e1b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>2. VBA\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9<\/h3>\n<p>\u30ab\u30b9\u30bf\u30e0\u30c7\u30fc\u30bf\u691c\u8a3c\u30a8\u30f3\u30b8\u30f3\u3092\u958b\u767a\u3059\u308b\u969b\u306f\u3001\u52b9\u7387\u7684\u3067\u4fdd\u5b88\u6027\u306e\u9ad8\u3044\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002\u4ee5\u4e0b\u306e\u30dd\u30a4\u30f3\u30c8\u306b\u6ce8\u610f\u3057\u307e\u3057\u3087\u3046\uff1a<\/p>\n<p>1. \u5909\u6570\u306e\u5ba3\u8a00: \u4f7f\u7528\u3059\u308b\u5909\u6570\u306f\u5fc5\u305a\u5ba3\u8a00\u3057\u3001\u9069\u5207\u306a\u30c7\u30fc\u30bf\u578b\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u6700\u9069\u5316\u3057\u3001\u30d0\u30b0\u3092\u9632\u3050\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>2. \u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0: On Error GoTo\u6587\u3092\u4f7f\u7528\u3057\u3066\u3001\u4e88\u671f\u305b\u306c\u30a8\u30e9\u30fc\u306b\u5bfe\u51e6\u3057\u307e\u3059\u3002\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9069\u5207\u306b\u8868\u793a\u3057\u3001\u30e6\u30fc\u30b6\u30fc\u306b\u5206\u304b\u308a\u3084\u3059\u3044\u60c5\u5831\u3092\u63d0\u4f9b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>3. \u30b3\u30fc\u30c9\u306e\u6700\u9069\u5316: \u30eb\u30fc\u30d7\u51e6\u7406\u3084\u6761\u4ef6\u5206\u5c90\u3092\u52b9\u7387\u7684\u306b\u8a2d\u8a08\u3057\u3001\u4e0d\u8981\u306a\u51e6\u7406\u3092\u907f\u3051\u307e\u3059\u3002\u7279\u306b\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3092\u6271\u3046\u5834\u5408\u306f\u3001\u51e6\u7406\u901f\u5ea6\u306b\u5927\u304d\u306a\u5f71\u97ff\u3092\u4e0e\u3048\u307e\u3059\u3002<\/p>\n<p>Excel\u30de\u30af\u30ed\u3092\u4f7f\u3044\u3053\u306a\u3059\u3053\u3068\u3067\u3001\u3053\u308c\u3089\u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u3092\u5b9f\u8df5\u3057\u3001\u9ad8\u6027\u80fd\u306a\u30ab\u30b9\u30bf\u30e0\u30c7\u30fc\u30bf\u691c\u8a3c\u30a8\u30f3\u30b8\u30f3\u3092\u958b\u767a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>3. \u30e6\u30fc\u30b6\u30fc\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306e\u91cd\u8981\u6027<\/h3>\n<p>\u30ab\u30b9\u30bf\u30e0\u30c7\u30fc\u30bf\u691c\u8a3c\u30a8\u30f3\u30b8\u30f3\u3092\u958b\u767a\u3059\u308b\u969b\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\uff08UI\uff09\u306b\u3082\u6ce8\u610f\u3092\u6255\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u512a\u308c\u305fUI\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u64cd\u4f5c\u6027\u3092\u5411\u4e0a\u3055\u305b\u3001\u30a8\u30e9\u30fc\u3092\u6e1b\u3089\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>1. \u30e6\u30fc\u30b6\u30fc\u30d5\u30a9\u30fc\u30e0: VBA\u306e\u30e6\u30fc\u30b6\u30fc\u30d5\u30a9\u30fc\u30e0\u3092\u6d3b\u7528\u3057\u3066\u3001\u30ab\u30b9\u30bf\u30e0\u30c0\u30a4\u30a2\u30ed\u30b0\u30dc\u30c3\u30af\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u7c21\u5358\u306b\u691c\u8a3c\u30eb\u30fc\u30eb\u3092\u8a2d\u5b9a\u3057\u305f\u308a\u3001\u7d50\u679c\u3092\u78ba\u8a8d\u3057\u305f\u308a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>2. \u6761\u4ef6\u4ed8\u304d\u66f8\u5f0f: Excel\u306e\u6761\u4ef6\u4ed8\u304d\u66f8\u5f0f\u6a5f\u80fd\u3068\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u3001\u30a8\u30e9\u30fc\u30bb\u30eb\u3092\u8996\u899a\u7684\u306b\u5f37\u8abf\u8868\u793a\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30e6\u30fc\u30b6\u30fc\u306f\u554f\u984c\u306e\u3042\u308b\u30c7\u30fc\u30bf\u3092\u7d20\u65e9\u304f\u7279\u5b9a\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>3. \u30b3\u30e1\u30f3\u30c8\u6a5f\u80fd: \u30bb\u30eb\u306b\u30b3\u30e1\u30f3\u30c8\u3092\u8ffd\u52a0\u3057\u3066\u3001\u30a8\u30e9\u30fc\u306e\u8a73\u7d30\u3084\u4fee\u6b63\u65b9\u6cd5\u3092\u63d0\u793a\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30e6\u30fc\u30b6\u30fc\u306f\u9069\u5207\u306a\u5bfe\u51e6\u65b9\u6cd5\u3092\u7406\u89e3\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>Excel\u30de\u30af\u30ed\u3092\u4f7f\u3063\u3066\u3053\u308c\u3089\u306eUI\u8981\u7d20\u3092\u5b9f\u88c5\u3059\u308b\u3053\u3068\u3067\u3001\u30ab\u30b9\u30bf\u30e0\u30c7\u30fc\u30bf\u691c\u8a3c\u30a8\u30f3\u30b8\u30f3\u306e\u4f7f\u3044\u3084\u3059\u3055\u3068\u52b9\u679c\u3092\u5927\u5e45\u306b\u5411\u4e0a\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0a\u306e3\u3064\u306e\u30dd\u30a4\u30f3\u30c8\u3092\u62bc\u3055\u3048\u308b\u3053\u3068\u3067\u3001\u52b9\u7387\u7684\u3067\u4f7f\u3044\u3084\u3059\u3044\u30ab\u30b9\u30bf\u30e0\u30c7\u30fc\u30bf\u691c\u8a3c\u30a8\u30f3\u30b8\u30f3\u3092\u958b\u767a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002Excel\u30de\u30af\u30ed\u306e\u529b\u3092\u6700\u5927\u9650\u306b\u6d3b\u7528\u3057\u3001\u30c7\u30fc\u30bf\u51e6\u7406\u306e\u81ea\u52d5\u5316\u3068\u54c1\u8cea\u5411\u4e0a\u3092\u5b9f\u73fe\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0a\u7d1a\u8005\u5411\u3051Excel\u30de\u30af\u30ed: \u30c7\u30fc\u30bf\u691c\u8a3c\u30a8\u30f3\u30b8\u30f3\u306e\u958b\u767a Excel\u3092\u4f7f\u3044\u3053\u306a\u3057\u3066\u3082\u3063\u3068\u697d\u3092\u3057\u305f\u3044\u3001\u696d\u52d9\u3092\u52b9\u7387\u5316\u3057\u305f\u3044\u4e0a\u7d1a\u8005\u306e\u65b9\u306b\u3001\u3059\u3050\u306b\u8a66\u305b\u308b\u30de\u30af\u30ed\u30b3\u30fc\u30c9\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002\u3053\u306e\u30b3\u30fc\u30c9\u306f\u3001\u30ab\u30b9\u30bf\u30e0\u30c7\u30fc\u30bf\u691c\u8a3c\u30a8\u30f3\u30b8\u30f3\u306e\u57fa\u790e\u3068\u306a<\/p>\n","protected":false},"author":2,"featured_media":665,"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-666","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\/666","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=666"}],"version-history":[{"count":0,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/posts\/666\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/media\/665"}],"wp:attachment":[{"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/media?parent=666"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/categories?post=666"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/tags?post=666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}