{"id":23843,"date":"2026-03-27T12:29:19","date_gmt":"2026-03-27T04:29:19","guid":{"rendered":"https:\/\/blog.iyatt.com\/?p=23843"},"modified":"2026-03-27T12:33:58","modified_gmt":"2026-03-27T04:33:58","slug":"excel-%e5%88%a0%e9%99%a4%e6%9d%a1%e4%bb%b6%e6%a0%bc%e5%bc%8f%ef%bc%8c%e4%bd%86%e4%bf%9d%e7%95%99%e6%a0%bc%e5%bc%8f%e7%9a%84%e6%96%b9%e6%a1%88","status":"publish","type":"post","link":"https:\/\/blog.iyatt.com\/?p=23843","title":{"rendered":"Excel \u5220\u9664\u6761\u4ef6\u683c\u5f0f\uff0c\u4f46\u4fdd\u7559\u683c\u5f0f\u7684\u65b9\u6848"},"content":{"rendered":"<p>\u57fa\u4e8e office 2024 \u6d4b\u8bd5\uff0cVBA \u811a\u672c\u6765\u81ea\uff1a<a href=\"https:\/\/zh-cn.extendoffice.com\/documents\/excel\/3686-excel-remove-conditional-formatting-but-keep-format.html\">https:\/\/zh-cn.extendoffice.com\/documents\/excel\/3686-excel-remove-conditional-formatting-but-keep-format.html<\/a><\/p>\n<p>1.Excel \u6253\u5f00\u8981\u5904\u7406\u7684\u8868\u683c\u6587\u4ef6\uff0c\u6309<code class=\"kb-btn\">Alt<\/code>+<code class=\"kb-btn\">F11<\/code>\u6253\u5f00 VBA \u7f16\u8f91\u5668<br \/>\n2.\u5de6\u8fb9\u53ef\u4ee5\u770b\u5230\u5bf9\u5e94\u7684 Excel \u6587\u4ef6\u548c Sheet \u8868\uff0c\u53cc\u51fb\u53ef\u4ee5\u6253\u5f00\u7f16\u8f91\uff0c\u7c98\u7c98\u4e0b\u9762\u4ee3\u7801<br \/>\n<img decoding=\"async\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2026\/03\/image-1774585465321.png\" alt=\"file\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 1044px; --smush-placeholder-aspect-ratio: 1044\/530;\" \/><\/p>\n<pre><code class=\"language-vba\">Sub Keep_Format()\n    Dim xRg As Range\n    Dim xTxt As String\n    Dim xCell As Range\n    On Error Resume Next\n\n    If ActiveWindow.RangeSelection.Count &gt; 1 Then\n        xTxt = ActiveWindow.RangeSelection.AddressLocal\n    Else\n        xTxt = ActiveSheet.UsedRange.AddressLocal\n    End If\n\n    Set xRg = Application.InputBox(&quot;\u9009\u62e9\u5355\u5143\u683c\u4f5c\u7528\u8303\u56f4\uff1a&quot;, &quot;\u5220\u9664\u6761\u4ef6\u683c\u5f0f\uff0c\u4fdd\u7559\u683c\u5f0f\u811a\u672c&quot;, xTxt, , , , , 8)\n    If xRg Is Nothing Then Exit Sub\n\n    For Each xCell In xRg\n        With xCell\n            .Font.FontStyle = .DisplayFormat.Font.FontStyle\n            .Font.Strikethrough = .DisplayFormat.Font.Strikethrough\n            .Interior.Pattern = .DisplayFormat.Interior.Pattern\n\n            If .Interior.Pattern &lt;&gt; xlNone Then\n                .Interior.PatternColorIndex = .DisplayFormat.Interior.PatternColorIndex\n                .Interior.Color = .DisplayFormat.Interior.Color\n            End If\n\n            .Interior.TintAndShade = .DisplayFormat.Interior.TintAndShade\n            .Interior.PatternTintAndShade = .DisplayFormat.Interior.PatternTintAndShade\n        End With\n    Next\n\n    xRg.FormatConditions.Delete\n\n    MsgBox &quot;\u5904\u7406\u5b8c\u6210\uff01\u5df2\u5220\u9664\u6761\u4ef6\u683c\u5f0f\u5e76\u4fdd\u7559\u5f53\u524d\u663e\u793a\u6548\u679c\u3002&quot;, vbInformation, &quot;\u63d0\u793a&quot;\nEnd Sub<\/code><\/pre>\n<p>3.\u5728 VBA \u7f16\u8f91\u5668\u4e2d\u6309<code class=\"kb-btn\">F5<\/code>\u6267\u884c\u811a\u672c\uff0c\u5f39\u6846\u4e2d\u9009\u62e9\u8981\u4f5c\u7528\u7684\u5355\u5143\u683c\u8303\u56f4<br \/>\n<img decoding=\"async\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2026\/03\/image-1774585592706.png\" alt=\"file\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 688px; --smush-placeholder-aspect-ratio: 688\/461;\" \/><\/p>\n<p>4.\u7b49\u5f85\u811a\u672c\u5b8c\u6210<br \/>\n<img decoding=\"async\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2026\/03\/image-1774585711097.png\" alt=\"file\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 349px; --smush-placeholder-aspect-ratio: 349\/183;\" \/><\/p>\n<p>\u8fd9\u6837\u683c\u5f0f\u6548\u679c\u4fdd\u7559\u4e86\uff0c\u4f46\u6761\u4ef6\u683c\u5f0f\u5220\u9664\u4e86\u3002<br \/>\n<img decoding=\"async\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2026\/03\/image-1774585929496.png\" alt=\"file\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 1378px; --smush-placeholder-aspect-ratio: 1378\/651;\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u57fa\u4e8e office 2024 \u6d4b\u8bd5\uff0cVBA \u811a\u672c\u6765\u81ea\uff1ahttps:\/\/zh-cn.extendoffice.c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"zakra_page_container_layout":"customizer","zakra_page_sidebar_layout":"customizer","zakra_remove_content_margin":false,"zakra_sidebar":"customizer","zakra_transparent_header":"customizer","zakra_logo":0,"zakra_main_header_style":"default","zakra_menu_item_color":"","zakra_menu_item_hover_color":null,"zakra_menu_item_active_color":null,"zakra_menu_active_style":"","zakra_page_header":true,"_lmt_disableupdate":"no","_lmt_disable":"no","footnotes":""},"categories":[1,649,648],"tags":[1750,1791,2030,2029],"class_list":["post-23843","post","type-post","status-publish","format-standard","hentry","category-all","category-excel","category-office","tag-excel","tag-office","tag-2030","tag-2029"],"modified_by":"IYATT-yx","_links":{"self":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/posts\/23843","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=23843"}],"version-history":[{"count":6,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/posts\/23843\/revisions"}],"predecessor-version":[{"id":23854,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/posts\/23843\/revisions\/23854"}],"wp:attachment":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=23843"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=23843"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=23843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}