{"id":671,"date":"2025-06-10T04:49:10","date_gmt":"2025-06-09T19:49:10","guid":{"rendered":"https:\/\/hajidai.com\/excel\/2025\/06\/%e3%80%8cexcel%e4%b8%8a%e7%b4%9a%e8%80%85%e5%bf%85%e8%a6%8b%ef%bc%81%e3%83%a1%e3%83%a2%e3%83%aa%e5%8a%b9%e7%8e%87%e3%82%92%e6%9c%80%e5%a4%a7%e5%8c%96%e3%81%99%e3%82%8b3%e3%81%a4%e3%81%ae%e3%83%87\/"},"modified":"2025-06-10T04:49:10","modified_gmt":"2025-06-09T19:49:10","slug":"%e3%80%8cexcel%e4%b8%8a%e7%b4%9a%e8%80%85%e5%bf%85%e8%a6%8b%ef%bc%81%e3%83%a1%e3%83%a2%e3%83%aa%e5%8a%b9%e7%8e%87%e3%82%92%e6%9c%80%e5%a4%a7%e5%8c%96%e3%81%99%e3%82%8b3%e3%81%a4%e3%81%ae%e3%83%87","status":"publish","type":"post","link":"https:\/\/hajidai.com\/excel\/2025\/06\/%e3%80%8cexcel%e4%b8%8a%e7%b4%9a%e8%80%85%e5%bf%85%e8%a6%8b%ef%bc%81%e3%83%a1%e3%83%a2%e3%83%aa%e5%8a%b9%e7%8e%87%e3%82%92%e6%9c%80%e5%a4%a7%e5%8c%96%e3%81%99%e3%82%8b3%e3%81%a4%e3%81%ae%e3%83%87\/","title":{"rendered":"\u300cExcel\u4e0a\u7d1a\u8005\u5fc5\u898b\uff01\u30e1\u30e2\u30ea\u52b9\u7387\u3092\u6700\u5927\u5316\u3059\u308b3\u3064\u306e\u30c7\u30fc\u30bf\u69cb\u9020\u8a2d\u8a08\u30c6\u30af\u30cb\u30c3\u30af\u300d"},"content":{"rendered":"<h2>Excel\u4e0a\u7d1a\u8005\u304c\u6975\u3081\u308b\u30e1\u30e2\u30ea\u52b9\u7387\u7684\u306a\u30c7\u30fc\u30bf\u69cb\u9020\u8a2d\u8a08<\/h2>\n<h3>\u4e0a\u7d1a\u8005\u5411\u3051\u30de\u30af\u30ed\u30b3\u30fc\u30c9\uff1a\u30c7\u30fc\u30bf\u69cb\u9020\u6700\u9069\u5316<\/h3>\n<p>&#8220;`vba<br \/>\nSub OptimizeDataStructure()<br \/>\n    Dim ws As Worksheet<br \/>\n    Dim lastRow As Long, lastCol As Long<br \/>\n    Dim rng As Range<\/p>\n<p>    Set ws = ActiveSheet<br \/>\n    lastRow = ws.Cells(ws.Rows.Count, &#8220;A&#8221;).End(xlUp).Row<br \/>\n    lastCol = ws.Cells(1, ws.Columns.Count).End(xlToLeft).Column<\/p>\n<p>    Set rng = ws.Range(ws.Cells(1, 1), ws.Cells(lastRow, lastCol))<\/p>\n<p>    &#8216; \u30c7\u30fc\u30bf\u306e\u91cd\u8907\u3092\u524a\u9664<br \/>\n    rng.RemoveDuplicates Columns:=Array(1, 2, 3), Header:=xlYes<\/p>\n<p>    &#8216; \u4e0d\u8981\u306a\u7a7a\u767d\u884c\u3092\u524a\u9664<br \/>\n    rng.SpecialCells(xlCellTypeBlanks).EntireRow.Delete<\/p>\n<p>    &#8216; \u30c7\u30fc\u30bf\u3092\u5727\u7e2e<br \/>\n    Application.DisplayAlerts = False<br \/>\n    ws.Copy<br \/>\n    ActiveWorkbook.SaveAs Filename:=ThisWorkbook.Path &#038; &#8220;\\Optimized_&#8221; &#038; ThisWorkbook.Name, FileFormat:=xlOpenXMLWorkbook<br \/>\n    ActiveWorkbook.Close<br \/>\n    Application.DisplayAlerts = True<\/p>\n<p>    MsgBox &#8220;\u30c7\u30fc\u30bf\u69cb\u9020\u306e\u6700\u9069\u5316\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002&#8221;<br \/>\nEnd Sub<br \/>\n&#8220;`<\/p>\n<p>\u3053\u306e\u30de\u30af\u30ed\u306f\u3001\u30c7\u30fc\u30bf\u306e\u91cd\u8907\u524a\u9664\u3001\u4e0d\u8981\u306a\u7a7a\u767d\u884c\u306e\u524a\u9664\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u5727\u7e2e\u3092\u884c\u3044\u3001\u30e1\u30e2\u30ea\u52b9\u7387\u7684\u306a\u30c7\u30fc\u30bf\u69cb\u9020\u3092\u5b9f\u73fe\u3057\u307e\u3059\u3002<\/p>\n<h3>1. \u30c7\u30fc\u30bf\u306e\u6b63\u898f\u5316<\/h3>\n<p>Excel\u4e0a\u7d1a\u8005\u304c\u6975\u3081\u308b\u30e1\u30e2\u30ea\u52b9\u7387\u7684\u306a\u30c7\u30fc\u30bf\u69cb\u9020\u8a2d\u8a08\u306e\u7b2c\u4e00\u306e\u30dd\u30a4\u30f3\u30c8\u306f\u3001\u30c7\u30fc\u30bf\u306e\u6b63\u898f\u5316\u3067\u3059\u3002\u6b63\u898f\u5316\u3068\u306f\u3001\u30c7\u30fc\u30bf\u306e\u91cd\u8907\u3092\u6700\u5c0f\u9650\u306b\u6291\u3048\u3001\u4e00\u8cab\u6027\u3092\u4fdd\u3064\u65b9\u6cd5\u3067\u3059\u3002\u5177\u4f53\u7684\u306b\u306f\u4ee5\u4e0b\u306e\u624b\u9806\u3092\u8e0f\u307f\u307e\u3059\uff1a<\/p>\n<p>1. \u91cd\u8907\u30c7\u30fc\u30bf\u306e\u524a\u9664\uff1aVLOOKUP\u3084REMOVE.DUPLICATES\u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u3001\u91cd\u8907\u3059\u308b\u30c7\u30fc\u30bf\u3092\u7279\u5b9a\u3057\u524a\u9664\u3057\u307e\u3059\u3002<br \/>\n2. \u30c7\u30fc\u30bf\u306e\u5206\u5272\uff1a\u5927\u304d\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u5c0f\u3055\u306a\u95a2\u9023\u30c6\u30fc\u30d6\u30eb\u306b\u5206\u5272\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u9867\u5ba2\u60c5\u5831\u3068\u6ce8\u6587\u60c5\u5831\u3092\u5225\u3005\u306e\u30b7\u30fc\u30c8\u306b\u4fdd\u5b58\u3057\u307e\u3059\u3002<br \/>\n3. \u53c2\u7167\u6574\u5408\u6027\u306e\u7dad\u6301\uff1a\u5206\u5272\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u9593\u306e\u95a2\u4fc2\u3092\u4fdd\u3064\u305f\u3081\u306b\u3001\u4e3b\u30ad\u30fc\u3068\u5916\u90e8\u30ad\u30fc\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3089\u306e\u624b\u9806\u3092\u8e0f\u3080\u3053\u3068\u3067\u3001\u30c7\u30fc\u30bf\u306e\u4e00\u8cab\u6027\u304c\u4fdd\u305f\u308c\u3001\u66f4\u65b0\u3084\u7ba1\u7406\u304c\u5bb9\u6613\u306b\u306a\u308a\u307e\u3059\u3002\u307e\u305f\u3001\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u3082\u5c0f\u3055\u304f\u306a\u308a\u3001Excel\u306e\u51e6\u7406\u901f\u5ea6\u3082\u5411\u4e0a\u3057\u307e\u3059\u3002<\/p>\n<h3>2. \u30c7\u30fc\u30bf\u578b\u306e\u6700\u9069\u5316<\/h3>\n<p>\u30e1\u30e2\u30ea\u52b9\u7387\u3092\u9ad8\u3081\u308b\u305f\u3081\u306e\u4e8c\u3064\u76ee\u306e\u30dd\u30a4\u30f3\u30c8\u306f\u3001\u9069\u5207\u306a\u30c7\u30fc\u30bf\u578b\u306e\u9078\u629e\u3067\u3059\u3002Excel\u3067\u306f\u3001\u30bb\u30eb\u306b\u5165\u529b\u3055\u308c\u305f\u30c7\u30fc\u30bf\u306e\u7a2e\u985e\u306b\u5fdc\u3058\u3066\u81ea\u52d5\u7684\u306b\u30c7\u30fc\u30bf\u578b\u304c\u5272\u308a\u5f53\u3066\u3089\u308c\u307e\u3059\u304c\u3001\u624b\u52d5\u3067\u6700\u9069\u306a\u30c7\u30fc\u30bf\u578b\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u524a\u6e1b\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>1. \u6570\u5024\u30c7\u30fc\u30bf\uff1a\u6574\u6570\u578b\u3084\u500d\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u306a\u3069\u3001\u5fc5\u8981\u6700\u5c0f\u9650\u306e\u7cbe\u5ea6\u3092\u6301\u3064\u30c7\u30fc\u30bf\u578b\u3092\u9078\u629e\u3057\u307e\u3059\u3002<br \/>\n2. \u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\uff1a\u56fa\u5b9a\u9577\u306e\u6587\u5b57\u5217\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f\u3001\u6700\u5927\u9577\u3092\u6307\u5b9a\u3057\u3066\u30e1\u30e2\u30ea\u3092\u7bc0\u7d04\u3057\u307e\u3059\u3002<br \/>\n3. \u65e5\u4ed8\u30c7\u30fc\u30bf\uff1a\u65e5\u4ed8\u578b\u3092\u4f7f\u7528\u3057\u3001\u30c6\u30ad\u30b9\u30c8\u578b\u3067\u4fdd\u5b58\u3057\u306a\u3044\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>Excel \u30de\u30af\u30ed\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u306b\u5bfe\u3057\u3066\u4e00\u62ec\u3067\u30c7\u30fc\u30bf\u578b\u306e\u5909\u66f4\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u624b\u4f5c\u696d\u3067\u306e\u5909\u66f4\u3088\u308a\u3082\u52b9\u7387\u7684\u306b\u30c7\u30fc\u30bf\u578b\u306e\u6700\u9069\u5316\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3>3. \u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3068\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u6d3b\u7528<\/h3>\n<p>\u4e09\u3064\u76ee\u306e\u30dd\u30a4\u30f3\u30c8\u306f\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3068\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u52b9\u679c\u7684\u306b\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u3059\u3002\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u6271\u3046\u5834\u5408\u3001\u691c\u7d22\u3084\u96c6\u8a08\u306e\u901f\u5ea6\u304c\u554f\u984c\u306b\u306a\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3092\u89e3\u6c7a\u3059\u308b\u305f\u3081\u306b\u3001\u4ee5\u4e0b\u306e\u65b9\u6cd5\u3092\u7528\u3044\u307e\u3059\uff1a<\/p>\n<p>1. \u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u4f5c\u6210\uff1a\u3088\u304f\u691c\u7d22\u3084\u4e26\u3079\u66ff\u3048\u3092\u884c\u3046\u5217\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u691c\u7d22\u901f\u5ea6\u304c\u5927\u5e45\u306b\u5411\u4e0a\u3057\u307e\u3059\u3002<br \/>\n2. \u30d4\u30dc\u30c3\u30c8\u30c6\u30fc\u30d6\u30eb\u306e\u6d3b\u7528\uff1a\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3092\u96c6\u8a08\u3059\u308b\u969b\u306f\u3001\u30d4\u30dc\u30c3\u30c8\u30c6\u30fc\u30d6\u30eb\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u30d4\u30dc\u30c3\u30c8\u30c6\u30fc\u30d6\u30eb\u306f\u5185\u90e8\u3067\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u3001\u9ad8\u901f\u306a\u96c6\u8a08\u304c\u53ef\u80fd\u3067\u3059\u3002<br \/>\n3. Power Query\u306e\u5229\u7528\uff1a\u5916\u90e8\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u304b\u3089\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u8fbc\u3080\u5834\u5408\u306f\u3001Power Query\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002Power Query\u306f\u30c7\u30fc\u30bf\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3057\u3001\u52b9\u7387\u7684\u306b\u51e6\u7406\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3089\u306e\u6280\u8853\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u3001\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3067\u3082\u9ad8\u901f\u304b\u3064\u30e1\u30e2\u30ea\u52b9\u7387\u7684\u306a\u51e6\u7406\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>Excel \u30de\u30af\u30ed\u3092\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u3053\u308c\u3089\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u4f5c\u6210\u3084\u30ad\u30e3\u30c3\u30b7\u30e5\u7ba1\u7406\u3092\u81ea\u52d5\u5316\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u5b9a\u671f\u7684\u306a\u30c7\u30fc\u30bf\u66f4\u65b0\u3084\u5206\u6790\u4f5c\u696d\u306b\u304a\u3044\u3066\u3001\u30de\u30af\u30ed\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u4f5c\u696d\u52b9\u7387\u304c\u5927\u5e45\u306b\u5411\u4e0a\u3057\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0a\u306e3\u3064\u306e\u30dd\u30a4\u30f3\u30c8\u3092\u62bc\u3055\u3048\u308b\u3053\u3068\u3067\u3001Excel\u4e0a\u7d1a\u8005\u3068\u3057\u3066\u30e1\u30e2\u30ea\u52b9\u7387\u7684\u306a\u30c7\u30fc\u30bf\u69cb\u9020\u8a2d\u8a08\u3092\u6975\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u6280\u8853\u3092\u9069\u5207\u306b\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u3001\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3067\u3082\u5feb\u9069\u306b\u4f5c\u696d\u3092\u9032\u3081\u3089\u308c\u308b\u3088\u3046\u306b\u306a\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Excel\u4e0a\u7d1a\u8005\u304c\u6975\u3081\u308b\u30e1\u30e2\u30ea\u52b9\u7387\u7684\u306a\u30c7\u30fc\u30bf\u69cb\u9020\u8a2d\u8a08 \u4e0a\u7d1a\u8005\u5411\u3051\u30de\u30af\u30ed\u30b3\u30fc\u30c9\uff1a\u30c7\u30fc\u30bf\u69cb\u9020\u6700\u9069\u5316 #8220;`vba Sub OptimizeDataStructure() Dim ws As Worksheet Di<\/p>\n","protected":false},"author":2,"featured_media":670,"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-671","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\/671","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=671"}],"version-history":[{"count":0,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/posts\/671\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/media\/670"}],"wp:attachment":[{"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/media?parent=671"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/categories?post=671"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/tags?post=671"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}