{"id":328,"date":"2024-12-27T06:33:35","date_gmt":"2024-12-26T21:33:35","guid":{"rendered":"https:\/\/hajidai.com\/excel\/2024\/12\/%e3%80%90excel%e4%b8%8a%e7%b4%9a%e8%80%85%e5%bf%85%e8%a6%8b%e3%80%911%e3%82%af%e3%83%aa%e3%83%83%e3%82%af%e3%81%a7%e5%ae%9f%e7%8f%be%e3%81%99%e3%82%8b%e9%ab%98%e5%ba%a6%e3%83%87%e3%83%bc%e3%82%bf\/"},"modified":"2024-12-27T06:33:35","modified_gmt":"2024-12-26T21:33:35","slug":"%e3%80%90excel%e4%b8%8a%e7%b4%9a%e8%80%85%e5%bf%85%e8%a6%8b%e3%80%911%e3%82%af%e3%83%aa%e3%83%83%e3%82%af%e3%81%a7%e5%ae%9f%e7%8f%be%e3%81%99%e3%82%8b%e9%ab%98%e5%ba%a6%e3%83%87%e3%83%bc%e3%82%bf","status":"publish","type":"post","link":"https:\/\/hajidai.com\/excel\/2024\/12\/%e3%80%90excel%e4%b8%8a%e7%b4%9a%e8%80%85%e5%bf%85%e8%a6%8b%e3%80%911%e3%82%af%e3%83%aa%e3%83%83%e3%82%af%e3%81%a7%e5%ae%9f%e7%8f%be%e3%81%99%e3%82%8b%e9%ab%98%e5%ba%a6%e3%83%87%e3%83%bc%e3%82%bf\/","title":{"rendered":"\u3010Excel\u4e0a\u7d1a\u8005\u5fc5\u898b\u30111\u30af\u30ea\u30c3\u30af\u3067\u5b9f\u73fe\u3059\u308b\u9ad8\u5ea6\u30c7\u30fc\u30bf\u30af\u30ec\u30f3\u30b8\u30f3\u30b0\u8853 &#8211; \u696d\u52d9\u52b9\u7387\u3092\u5287\u7684\u306b\u5411\u4e0a\u3055\u305b\u308b\u6700\u5f37\u30de\u30af\u30ed"},"content":{"rendered":"<h2>Excel\u4e0a\u7d1a\u8005\u306e\u305f\u3081\u306e\u9ad8\u5ea6\u306a\u30c7\u30fc\u30bf\u30af\u30ec\u30f3\u30b8\u30f3\u30b0\u30de\u30af\u30ed\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\u5f37\u529b\u306a\u30de\u30af\u30ed\u30b3\u30fc\u30c9\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u306f\u3001\u30c7\u30fc\u30bf\u30af\u30ec\u30f3\u30b8\u30f3\u30b0\u306e\u57fa\u672c\u7684\u306a\u51e6\u7406\u3092\u81ea\u52d5\u5316\u3059\u308b\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>&#8220;`vba<br \/>\nSub DataCleansing()<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 = lastRow To 2 Step -1<br \/>\n        &#8216; \u7a7a\u767d\u884c\u306e\u524a\u9664<br \/>\n        If Application.CountA(ws.Rows(i)) = 0 Then<br \/>\n            ws.Rows(i).Delete<br \/>\n        Else<br \/>\n            &#8216; \u524d\u5f8c\u306e\u7a7a\u767d\u3092\u524a\u9664<br \/>\n            ws.Cells(i, 1).Value = Trim(ws.Cells(i, 1).Value)<br \/>\n            &#8216; \u5927\u6587\u5b57\u306b\u5909\u63db<br \/>\n            ws.Cells(i, 2).Value = UCase(ws.Cells(i, 2).Value)<br \/>\n            &#8216; \u6570\u5024\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u7d71\u4e00<br \/>\n            If IsNumeric(ws.Cells(i, 3).Value) Then<br \/>\n                ws.Cells(i, 3).NumberFormat = &#8220;#,##0.00&#8221;<br \/>\n            End If<br \/>\n        End If<br \/>\n    Next i<\/p>\n<p>    MsgBox &#8220;\u30c7\u30fc\u30bf\u30af\u30ec\u30f3\u30b8\u30f3\u30b0\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002&#8221;, vbInformation<br \/>\nEnd Sub<br \/>\n&#8220;`<\/p>\n<p>\u3053\u306e\u30de\u30af\u30ed\u306f\u3001\u7a7a\u767d\u884c\u306e\u524a\u9664\u3001\u30bb\u30eb\u5185\u306e\u524d\u5f8c\u306e\u7a7a\u767d\u9664\u53bb\u3001\u7279\u5b9a\u5217\u306e\u5927\u6587\u5b57\u5909\u63db\u3001\u6570\u5024\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u7d71\u4e00\u306a\u3069\u306e\u57fa\u672c\u7684\u306a\u30c7\u30fc\u30bf\u30af\u30ec\u30f3\u30b8\u30f3\u30b0\u4f5c\u696d\u3092\u81ea\u52d5\u5316\u3057\u307e\u3059\u3002<\/p>\n<h3>1. \u9ad8\u5ea6\u306a\u30c7\u30fc\u30bf\u30af\u30ec\u30f3\u30b8\u30f3\u30b0\u306e\u91cd\u8981\u6027<\/h3>\n<p>Excel\u3067\u306e\u30c7\u30fc\u30bf\u5206\u6790\u3084\u5831\u544a\u66f8\u4f5c\u6210\u306b\u304a\u3044\u3066\u3001\u30af\u30ea\u30fc\u30f3\u3067\u4e00\u8cab\u6027\u306e\u3042\u308b\u30c7\u30fc\u30bf\u306f\u4e0d\u53ef\u6b20\u3067\u3059\u3002\u4e0a\u7d1a\u8005\u5411\u3051\u306e\u9ad8\u5ea6\u306a\u30c7\u30fc\u30bf\u30af\u30ec\u30f3\u30b8\u30f3\u30b0\u30de\u30af\u30ed\u3092\u958b\u767a\u3059\u308b\u3053\u3068\u3067\u3001\u8907\u96d1\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u52b9\u7387\u7684\u306b\u51e6\u7406\u3057\u3001\u5206\u6790\u306e\u8cea\u3092\u5411\u4e0a\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>Excel \u30de\u30af\u30ed\u3092\u6d3b\u7528\u3057\u305f\u30c7\u30fc\u30bf\u30af\u30ec\u30f3\u30b8\u30f3\u30b0\u306f\u3001\u5358\u7d14\u306a\u4f5c\u696d\u306e\u81ea\u52d5\u5316\u3060\u3051\u3067\u306a\u304f\u3001\u8907\u96d1\u306a\u30eb\u30fc\u30eb\u3084\u6761\u4ef6\u306b\u57fa\u3065\u3044\u305f\u30c7\u30fc\u30bf\u306e\u6574\u7406\u30fb\u5909\u63db\u3092\u53ef\u80fd\u306b\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u4eba\u70ba\u7684\u30df\u30b9\u3092\u6e1b\u3089\u3057\u3001\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3092\u77ed\u6642\u9593\u3067\u51e6\u7406\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3>2. \u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u53ef\u80fd\u306a\u30de\u30af\u30ed\u958b\u767a\u306e\u30dd\u30a4\u30f3\u30c8<\/h3>\n<p>\u9ad8\u5ea6\u306a\u30c7\u30fc\u30bf\u30af\u30ec\u30f3\u30b8\u30f3\u30b0\u30de\u30af\u30ed\u3092\u958b\u767a\u3059\u308b\u969b\u306f\u3001\u4ee5\u4e0b\u306e\u30dd\u30a4\u30f3\u30c8\u306b\u6ce8\u610f\u3057\u307e\u3057\u3087\u3046\uff1a<\/p>\n<p>1. \u30e2\u30b8\u30e5\u30fc\u30eb\u5316\uff1a\u51e6\u7406\u3092\u6a5f\u80fd\u3054\u3068\u306b\u5206\u5272\u3057\u3001\u518d\u5229\u7528\u53ef\u80fd\u306a\u30b5\u30d6\u30eb\u30fc\u30c1\u30f3\u3084\u30d5\u30a1\u30f3\u30af\u30b7\u30e7\u30f3\u3068\u3057\u3066\u5b9f\u88c5\u3057\u307e\u3059\u3002<br \/>\n2. \u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\uff1a\u60f3\u5b9a\u5916\u306e\u30c7\u30fc\u30bf\u5f62\u5f0f\u3084\u5024\u306b\u5bfe\u51e6\u3067\u304d\u308b\u3088\u3046\u3001\u9069\u5207\u306a\u30a8\u30e9\u30fc\u51e6\u7406\u3092\u7d44\u307f\u8fbc\u307f\u307e\u3059\u3002<br \/>\n3. \u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6700\u9069\u5316\uff1a\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3092\u6271\u3046\u969b\u3082\u9ad8\u901f\u306b\u52d5\u4f5c\u3059\u308b\u3088\u3046\u3001\u30eb\u30fc\u30d7\u51e6\u7406\u306e\u6700\u9069\u5316\u3084\u30a2\u30ec\u30a4\u306e\u6d3b\u7528\u3092\u691c\u8a0e\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3089\u306e\u30dd\u30a4\u30f3\u30c8\u3092\u62bc\u3055\u3048\u308b\u3053\u3068\u3067\u3001\u67d4\u8edf\u6027\u304c\u9ad8\u304f\u3001\u5805\u7262\u306aExcel \u30de\u30af\u30ed\u3092\u958b\u767a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>3. \u9ad8\u5ea6\u306a\u30c7\u30fc\u30bf\u30af\u30ec\u30f3\u30b8\u30f3\u30b0\u6280\u8853\u306e\u5fdc\u7528<\/h3>\n<p>\u4e0a\u7d1a\u8005\u5411\u3051\u306e\u30c7\u30fc\u30bf\u30af\u30ec\u30f3\u30b8\u30f3\u30b0\u30de\u30af\u30ed\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u9ad8\u5ea6\u306a\u6a5f\u80fd\u3092\u7d44\u307f\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u3059\uff1a<\/p>\n<p>1. \u6b63\u898f\u8868\u73fe\u3092\u7528\u3044\u305f\u30d1\u30bf\u30fc\u30f3\u30de\u30c3\u30c1\u30f3\u30b0\uff1a\u8907\u96d1\u306a\u6587\u5b57\u5217\u306e\u62bd\u51fa\u3084\u7f6e\u63db\u3092\u884c\u3044\u307e\u3059\u3002<br \/>\n2. \u5916\u90e8\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3068\u306e\u9023\u643a\uff1aAPI\u3084\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u3001\u30af\u30ec\u30f3\u30b8\u30f3\u30b0\u3092\u884c\u3044\u307e\u3059\u3002<br \/>\n3. \u6a5f\u68b0\u5b66\u7fd2\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e\u6d3b\u7528\uff1a\u7570\u5e38\u5024\u306e\u691c\u51fa\u3084\u6b20\u640d\u5024\u306e\u88dc\u5b8c\u306b\u3001\u7c21\u5358\u306a\u6a5f\u68b0\u5b66\u7fd2\u30e2\u30c7\u30eb\u3092\u9069\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3089\u306e\u6280\u8853\u3092\u99c6\u4f7f\u3059\u308b\u3053\u3068\u3067\u3001Excel \u30de\u30af\u30ed\u3092\u7528\u3044\u305f\u9ad8\u5ea6\u306a\u30c7\u30fc\u30bf\u30af\u30ec\u30f3\u30b8\u30f3\u30b0\u304c\u53ef\u80fd\u3068\u306a\u308a\u3001\u30c7\u30fc\u30bf\u5206\u6790\u306e\u7cbe\u5ea6\u3068\u52b9\u7387\u3092\u5927\u5e45\u306b\u5411\u4e0a\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0a\u306e\u30dd\u30a4\u30f3\u30c8\u3092\u62bc\u3055\u3048\u3001\u81ea\u793e\u306e\u696d\u52d9\u3084\u6271\u3046\u30c7\u30fc\u30bf\u306e\u7279\u6027\u306b\u5408\u308f\u305b\u3066\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u3053\u3068\u3067\u3001\u5f37\u529b\u306a\u30c7\u30fc\u30bf\u30af\u30ec\u30f3\u30b8\u30f3\u30b0\u30c4\u30fc\u30eb\u3092\u624b\u306b\u5165\u308c\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002Excel \u30de\u30af\u30ed\u306e\u958b\u767a\u30b9\u30ad\u30eb\u3092\u78e8\u304d\u3001\u30c7\u30fc\u30bf\u51e6\u7406\u306e\u52b9\u7387\u5316\u3092\u56f3\u308a\u307e\u3057\u3087\u3046\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Excel\u4e0a\u7d1a\u8005\u306e\u305f\u3081\u306e\u9ad8\u5ea6\u306a\u30c7\u30fc\u30bf\u30af\u30ec\u30f3\u30b8\u30f3\u30b0\u30de\u30af\u30ed\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\u5f37\u529b\u306a\u30de\u30af\u30ed\u30b3\u30fc\u30c9\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u306f\u3001\u30c7\u30fc\u30bf\u30af\u30ec\u30f3\u30b8\u30f3\u30b0\u306e\u57fa<\/p>\n","protected":false},"author":2,"featured_media":327,"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-328","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\/328","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=328"}],"version-history":[{"count":0,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/posts\/328\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/media\/327"}],"wp:attachment":[{"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/media?parent=328"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/categories?post=328"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/tags?post=328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}