ExcelHome技术论坛

 找回密码
 免费注册

QQ登录

只需一步,快速开始

快捷登录

搜索
EH技术汇-专业的职场技能充电站 妙哉!函数段子手趣味讲函数 Excel服务器-会Excel,做管理系统 效率神器,一键搞定繁琐工作
HR薪酬管理数字化实战 Excel 2021函数公式学习大典 Excel数据透视表实战秘技 打造核心竞争力的职场宝典
让更多数据处理,一键完成 数据工作者的案头书 免费直播课集锦 ExcelHome出品 - VBA代码宝免费下载
用ChatGPT与VBA一键搞定Excel WPS表格从入门到精通 Excel VBA经典代码实践指南
12
返回列表 发新帖
楼主: a99456820

[求助] 如何将条件格式中的单元格颜色作为转换为真正的单元格颜色填充呀

[复制链接]

TA的精华主题

TA的得分主题

发表于 2013-5-15 21:30 | 显示全部楼层
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件       ★免费下载 ★       ★ 使用帮助
学习了!谢谢楼上

TA的精华主题

TA的得分主题

发表于 2020-5-18 14:37 | 显示全部楼层
tyc_198 发表于 2013-1-5 16:40
先选中你要处理的表格,Ctrl+c,点击剪贴板右边的小下拉箭头标志,调出剪贴板栏,双击刚刚复制的剪贴板文件 ...

可以多谢多谢

TA的精华主题

TA的得分主题

发表于 2020-8-19 14:35 | 显示全部楼层
Sub 条件格式颜色转背景颜色()





   Dim i As Integer
    For i = 2 To 30
        cl = Range("A" & i).DisplayFormat.Interior.Color
        Range("A" & i).Interior.Color = cl
    Next
    Range("A2:A30").FormatConditions.Delete
End Sub


网上找的,我的可以用 ,只保留条件格式背景色,不保留条件格式的字体颜色

TA的精华主题

TA的得分主题

发表于 2021-2-24 19:37 | 显示全部楼层
本帖最后由 psxk3535 于 2021-2-25 11:19 编辑

Sub 非空单元格条件色转背景色加框线()
Sheets("aaa").Select

Dim s As Integer, r As Integer
For s = 1 To Cells(1, 255).End(xlToLeft).Column  
For r = 2 To Cells(65536, 1).End(xlUp).Row         
cl = Cells(r, s).DisplayFormat.Interior.Color         
sl = Cells(r, s).DisplayFormat.Font.Color              
        Cells(r, s).Interior.Color = cl               
        Cells(r, s).Font.Color = sl                  
        Cells(r, s).FormatConditions.Delete      
        Cells(r, s).Borders.LineStyle = True      
    Next r                                             
  Next s                                            
End Sub


如何判断字体是不是粗体,如果是粗体,就保持,该如何做

TA的精华主题

TA的得分主题

发表于 2021-2-25 16:27 | 显示全部楼层
psxk3535 发表于 2021-2-24 19:37
Sub 非空单元格条件色转背景色加框线()
Sheets("aaa").Select

已经解决,虽然繁琐了点

Dim s As Integer, r As Integer
For s = 1 To Cells(1, 255).End(xlToLeft).Column         
For r = 2 To Cells(65536, 1).End(xlUp).Row              
cl = Cells(r, s).DisplayFormat.Interior.Color           
sl = Cells(r, s).DisplayFormat.Font.Color               
cx = Cells(r, s).DisplayFormat.Font.Bold
xt = Cells(r, s).DisplayFormat.Font.Italic
mz = Cells(r, s).DisplayFormat.Font.Name
zh = Cells(r, s).DisplayFormat.Font.Size
        Cells(r, s).Interior.Color = cl                  
        Cells(r, s).Font.Color = sl                     
        Cells(r, s).Font.Bold = cx
        Cells(r, s).Font.Italic = xt
        Cells(r, s).Font.Name = mz
        Cells(r, s).Font.Size = zh
        Cells(r, s).FormatConditions.Delete            
        Cells(r, s).Borders.LineStyle = True            
    Next r                                               
  Next s                                               

TA的精华主题

TA的得分主题

发表于 2024-5-10 11:43 | 显示全部楼层
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件       ★免费下载 ★       ★ 使用帮助
tyc_198 发表于 2013-1-5 16:40
先选中你要处理的表格,Ctrl+c,点击剪贴板右边的小下拉箭头标志,调出剪贴板栏,双击刚刚复制的剪贴板文件 ...

谢谢,一直在找这个方法
您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

手机版|关于我们|联系我们|ExcelHome

GMT+8, 2024-9-28 05:30 , Processed in 0.033961 second(s), 6 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 1999-2023 Wooffice Inc.

沪公网安备 31011702000001号 沪ICP备11019229号-2

本论坛言论纯属发表者个人意见,任何违反国家相关法律的言论,本站将协助国家相关部门追究发言者责任!     本站特聘法律顾问:李志群律师

快速回复 返回顶部 返回列表