获取单元格颜色的Excel公式 [英] Excel formula to get cell color

查看:112
本文介绍了获取单元格颜色的Excel公式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道我们是否可以借助任何内联公式(不使用任何宏)找出 CELL 的颜色

I would like to know if we can find out the Color of the CELL with the help of any inline formula (without using any macros)

我使用的是 Home User Office 软件包 2010.

I'm using Home User Office package 2010.

推荐答案

如评论中所说,以防万一我在那里发布的链接坏了,试试这个:

As commented, just in case the link I posted there broke, try this:

在功能区的公式选项卡下的 Excel 名称管理器中添加名称(任何有效名称).
然后使用 GET.CELL 函数指定一个公式.

Add a Name(any valid name) in Excel's Name Manager under Formula tab in the Ribbon.
Then assign a formula using GET.CELL function.

=GET.CELL(63,INDIRECT("rc",FALSE))

63 代表背景色.
假设我们将其命名为 Background 以便在具有颜色类型的任何单元格中:

63 stands for backcolor.
Let's say we name it Background so in any cell with color type:

=背景

结果:

请注意,单元格 A2、A3 和 A4 分别返回 3、4 和 5,这相当于单元格背景颜色索引.HTH.
顺便说一句,这是 Excel 的 颜色索引

Notice that Cells A2, A3 and A4 returns 3, 4, and 5 respectively which equates to the cells background color index. HTH.
BTW, here's a link on Excel's Color Index

这篇关于获取单元格颜色的Excel公式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆