简体   繁体   English

突出显示 A:B 列中值相同但 C 列中值不同的行

[英]Highlight rows where the same values in columns A:B but different values in column C

I have 4000+ rows of data need to be working on.我有 4000 多行数据需要处理。 Where column A represents the SKU, column B represents the unit and column C represents the Unit Price.其中A列代表SKU,B列代表单位,C列代表单价。 The same SKU, Unit and Unit Price may duplicate at their own columns as shown as the picture attached.相同的 SKU、单位和单价可能会在它们自己的列中重复,如所附图片所示。 I need to check and highlight whether which SKU, appears to have different Unit Price but with same Unit.我需要检查并突出显示哪个 SKU 似乎具有不同的单价但具有相同的单位。 Which mean same SKU (Column A), same Unit (Column B) but different in Unit Price (Column C).这意味着相同的 SKU(A 列),相同的单位(B 列)但单价不同(C 列)。

Is there any possible method or formula for doing this checking instead of checking row-by-row manually?是否有任何可能的方法或公式来进行此检查而不是手动逐行检查?

[ [ 如何找到与图片中第4行相同的案例(具有相同的SKU,相同的单位但不同的单价)

How to I find the same cases just like row 4 in the picture (with same SKU, same Unit but different Unit Price?如何找到与图片中第4行相同的案例(具有相同的SKU,相同的单位但不同的单价?

You can design a Conditional Formatting rule using a formula based on the COUNTIFS function .您可以使用基于COUNTIFS 函数的公式设计条件格式规则。 If you set a rule such that there must be at least two other rows with the same SKU and Unit combination but with different Unit Prices then a formula can be easily derived.如果您设置的规则必须至少有两行具有相同的 SKU 和单位组合但具有不同的单位价格,则可以轻松推导出公式。

First, select all of columns A:C then go to Home ► Styles ► Conditional Formatting ► New Rule.首先,选择 A:C 的所有列,然后转到主页 ► 样式 ► 条件格式 ► 新规则。 Opt for Use a formula to determine which cells to format and supply the following for the Format values where this formula is true: text box.选择使用公式来确定要设置格式的单元格,为该公式为真的格式值提供以下内容文本框。

=AND(ROW(A1)>1, COUNTIFS($A:$A, $A1, $B:$B, $B1, $C:$C, "<>"&$C1)>1)

Click Format and apply some formatting the OK to accept the formatting and OK again to create the new rule.单击“格式”并应用一些格式,然后单击“确定”接受格式并再次“确定”以创建新规则。 Your results should resemble the following.您的结果应类似于以下内容。

条件格式流氓单价

Note that I've added one more row of data to the sample data.请注意,我在示例数据中又添加了一行数据。

With sorting by ColumnA, then Column B then Column C and assuming a reasonably up-to-date version of Excel, please select ColumnsA:C and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true: :通过按 ColumnA 排序,然后是 B 列,然后是 C 列并假设 Excel 的合理最新版本,请选择 ColumnsA:C 和 HOME > 样式 - 条件格式,新规则...,使用公式来确定哪些单元格在此公式为真的情况下格式化格式化值::

=AND($A1048576=$A1,$B1048576=$B1,$C1048576<>$C1)  

Format... , select your choice of formatting (red), OK, OK.格式... ,选择您选择的格式(红色),确定,确定。

This is a version of =AND(A2=A3,B2=B3,C2<>C3) (which follows how you expressed the problem) adapted to simplify the range selection ( Applies to ).这是=AND(A2=A3,B2=B3,C2<>C3) (遵循您表达问题的方式)的一个版本,适用于简化范围选择( Applies to )。

The sorting is important because this looks for the first change in Unit Price since a preceding Unit Price for the same SKU / Unit pair, consistent with your choice not to highlight [A123,5,25] though 25 is as different from 30 as 30 is from 25 !排序是重要的,因为这会在第一个变化Unit Price从先前的Unit Price为同一SKU / Unit对,您选择不亮[A123,5,25]一致,虽然25是不同于3030是从25 In the image I have added some additional examples for illustration.在图像中,我添加了一些额外的例子来说明。

SO3006173 第一个例子

For sorting:对于排序:

SO3006173 第二个例子

Create a formula in column D:在 D 列中创建一个公式:

=CONCATENATE(A2,"-",B2,"-",C2)

Select Column D and apply Conditonal Formatting -> Higlight Cells Rules -> Duplicate Values选择D 列并应用条件格式 -> 突出显示单元格规则 -> 重复值

条件格式选项

Apply the formatting to unique cells.将格式应用于唯一的单元格。

重复值格式对话框

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Excel:如果两行或多行在两列(A 和 B)中包含匹配值,请确保将它们的值合并到它们的列 C - Excel: where two or more rows contain matching values in two columns (A and B), ensure their values are merged in their column C 仅当列A和列B中的所有相邻值都相同时,才可以将列C中的值求和吗? - Is it possible to sum values in column C into column D, ONLY when all adjacent values in columns A and B are the same? 识别2个不同列中具有相同值的行 - Identify Rows with Same Values in 2 Different Columns sql中相同的值不同的列 - sql where same values different columns 我想比较3个不同的列(B,C,D)的值,然后想在F列中获得较高的值结果 - I want to compare 3 different columns (B,C,D) values then want to get the higher value result in F column 通过 VBA 减去:C 列中的行值 = A 列中的行值 - B 列中的行值 - Subtract via VBA: Rows values in Column C = Row values in Column A - Row values in Column B 为B列中的相同值选择B列中的最小值吗? - select min value in B column for same values in A columns excel? Excel:为A列的相同值计算B列的平均值,其中仅存在B列的所有值对应于相同的A值 - Excel: calculate average of column B for same values of column A where only all values of column B to corresponding same A value is present 从2列中删除具有相同值但与1列不同的EXCEL连续行 - Delete EXCEL consecutive rows that have same values from 2 columns but different from 1 column Excel CONCAT 列 B 和 C 虽然它们在列 A 具有相似的值 - Excel CONCAT Columns B and C While they have Similar Values at Column A
相关标签
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM