excel隐私警告_Excel隐藏数据警告

excel隐私警告

Excel隐藏数据警告 (Excel Hidden Data Warning)

Have you seen the articles that blame Excel for all kinds of business errors? In some cases, problems occur because rows were hidden, and that distorted the data analysis. To help avoid those problems, I created a sample file that shows an Excel hidden data warning, if rows or columns are hidden.

您是否看过将Excel归咎于各种业务错误的文章? 在某些情况下,会出现问题,因为行被隐藏了,这扭曲了数据分析。 为了帮助避免这些问题,我创建了一个示例文件,该文件显示Excel隐藏数据警告(如果隐藏了行或列)。

帮助而非预防 (Help, Not Prevention)

This solution should help you spot hidden rows and columns, but don't depend solely on this when you're doing critical work.

该解决方案应该可以帮助您发现隐藏的行和列,但是当您执行关键工作时 ,不要仅仅依赖于此

Use visual checks for filtered or hidden rows, or hidden columns, and remember to look for hidden sheets too.

对过滤的或隐藏的行或隐藏的列进行视觉检查,并记住也要查找隐藏的工作表。

As always, our goal is to make things idiot resistant, not idiot proof.

与往常一样,我们的目标是使事情白痴性 ,不是白痴的证明。

隐藏行警告 (Hidden Row Warning)

Here's how I set up the Excel hidden data warnings.

这是我设置Excel隐藏数据警告的方法。

At the top of the sheet, in cell B2, there's a formula to check for hidden rows. It counts the missing rows, whether they're hidden manually, or by a filter.

在工作表的顶部,单元格B2中,有一个公式来检查隐藏的行。 它会计算丢失的行,无论这些行是手动隐藏还是通过筛选器隐藏。

In this screen shot, no filters have been applied to the table, but rows 12:13 were manually hidden, so the formula result is 2.

在此屏幕快照中,没有对表应用任何过滤器,但是手动隐藏了12:13行,因此公式结果为2。

隐藏行公式 (Hidden Rows Formula)

Here's the formula that's in cell B2:

这是单元格B2中的公式:

=COUNT(Table1[OrderCount]) - AGGREGATE(2,5,Table1[OrderCount])

= COUNT(Table1 [OrderCount])-AGGREGATE(2,5,Table1 [OrderCount])

First, the formula counts all the numbers in the OrderCount column. That column has a simple formula that returns a 1 in each row.

首先,该公式计算OrderCount列中的所有数字。 该列具有一个简单的公式,该公式在每行中返回1。

=1

= 1

Counting those cells should give an accurate count of the number of rows in the table.

对这些单元格进行计数应该可以对表中的行数进行准确的计数。

=COUNT(Table1[OrderCount])

= COUNT(Table1 [OrderCount])

计算可见行 (Count the Visible Rows)

Next, the AGGREGATE function counts the visible cells in the OrderCount column.

接下来, AGGREGATE函数对OrderCount列中的可见单元进行计数。

AGGREGATE(2,5,Table1[OrderCount])

AGGREGATE(2,5,Table1 [OrderCount])

AGGREGATE uses function type 2 ( COUNT), and is set to ignore hidden rows (option 5).

AGGREGATE使用函数类型2(COUNT),并设置为忽略隐藏的行(选项5)。

hiddencolumns04

隐藏行数 (Number of Hidden Rows)

In this example, there are 21 rows in the table (COUNT) and 19 visible rows (AGGREGATE)

在此示例中,表中有21行(COUNT)和19个可见行(AGGREGATE)

To find the number of hidden rows, subtract the visible rows from the total count, and the result is 2 hidden rows.

要查找隐藏的行数,请从总数中减去可见的行,结果是2个隐藏的行。

hiddencolumns05

隐藏列警告–尝试1 (Hidden Column Warning – Attempt 1)

Unfortunately, AGGREGATE doesn't work for columns, just rows, so how can you tell if columns are hidden?

不幸的是,AGGREGATE不适用于列,仅适用于行,那么如何确定列是否被隐藏?

A hidden column would have zero width, so I used the CELL function to check the cell widths in the top row, cells A1:J1.

一个隐藏的列的宽度为零,因此我使用CELL函数检查第一行单元格A1:J1中的单元格宽度。

=IF(CELL("width",A1)>1,1,0)

= IF(CELL(“ width”,A1)> 1,1,0)

Then, in cell B3, a formula subtracts the sum of those cells, from the count of the cells.

然后,在单元格B3中,公式从这些单元格的计数中减去这些单元格的总和。

=COUNT(A1:J1)-SUM(A1:J1)

= COUNT(A1:J1)-SUM(A1:J1)

In theory, that solution works, but the results didn't automatically update if columns were hidden or unhidden. In this screen shot

从理论上讲,该解决方案有效,但是如果隐藏或隐藏列,结果不会自动更新。 在此屏幕快照中

  • D and E have been unhidden, but are still showing zeros

    D和E已被隐藏,但仍显示零
  • F, G and H are hidden, but are still calculating as 1

    F,G和H隐藏,但仍计算为1
  • The Hidden Columns total shows 2, instead of 3

    隐藏列总计显示2,而不是3

To see the correct number of hidden columns, you can press F9 to recalculate.

要查看正确数量的隐藏列,可以按F9重新计算。

hiddencolumns06

隐藏列警告–尝试2 (Hidden Column Warning – Attempt 2)

An Excel hidden data warning isn't too helpful, if you have to remember to recalculate.

如果您必须记住要重新计算,则Excel隐藏数据警告不是很有用。

But, as a conditional formatting rule in cells A1:J1, it seems to work nicely. I've only tested in a small file though, so your results might be different.

但是,作为单元格A1:J1中的条件格式设置规则 ,它似乎工作得很好。 不过,我仅在一个小文件中进行了测试,因此您的结果可能有所不同

With cells A1:J1 selected, I created a new formatting rule, using this formula:

选择单元格A1:J1后,我使用以下公式创建了新的格式设置规则:

=CELL("width",B1)=0

= CELL(“ width”,B1)= 0

A cell turns yellow, if the cell to its right is hidden (0 width).

如果右侧的单元格被隐藏(0宽度),则该单元格将变为黄色。

In this screen shot, columns D:E and H:I are hidden. As a result, cells C1 and G1 have yellow fill colour, based on the conditional formatting rule.

在此屏幕快照中,列D:E和H:I被隐藏。 结果,基于条件格式设置规则,单元格C1和G1具有黄色填充色。

hiddencolumns07

警告关于警告 (Warning About the Warning)

Charles Williams found that conditional formats "are not executed at a calculation unless they are on the visible portion of the screen".

查尔斯·威廉姆斯(Charles Williams)发现,条件格式“除非在屏幕的可见部分,否则不会在计算时执行”。

So, if you try this Excel hidden data warning technique:

因此,如果您尝试使用此Excel隐藏数据警告技术:

  • Be sure to lock the top row.

    确保锁定第一行。
  • Recalculate too, just to be sure that the correct cells are coloured.

    也要重新计算,以确保正确的单元格已着色。
  • Before you do any critical data analysis, do a visual check to see if any rows or columns  or entire sheets are hidden.

    在执行任何关键数据分析之前,请进行目视检查以查看是否隐藏了任何行或列或整个工作表。

Remember, as the old saying goes, it's better to be safe, than to read about your catastrophic errors on the internet.

请记住,正如古老的谚语所说,安全起来比在互联网上阅读您的灾难性错误要好。

socialmedia01

下载Excel隐藏数据警告文件 (Download the Excel Hidden Data Warning File)

To download the Excel hidden data warning workbook, go to the Conditional Formatting Examples page on my Contextures site.

要下载Excel隐藏数据警告工作簿,请转到Contextures网站上的“ 条件格式示例”页面

Excel隐藏数据警告 (Excel Hidden Data Warning)

翻译自: https://contexturesblog.com/archives/2018/04/05/excel-hidden-data-warning/

excel隐私警告

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值