Highlighted Background Colors for Duplicate Values in Adjacent Cells

  • Last update:May 28, 2025
  • Overview

    Expected Effect

    For data in a column where the values are displayed in a list, if adjacent cells contain identical values (which are considered errors), the background of the cells should be highlighted, as shown in the following figure.

     1.png

    Implementation Method

    You can use hierarchical coordinate formulas in Condition Attribute to get the values of the cells above and below the current cell. If the current cell value is the same as the previous or next cell value, the background color of the current cell is red.

    Example

    Data Preparation

    Create a general report and create a built-in dataset, as shown in the following figure.

     2.png

    Table Design

    Drag the data columns into the cells respectively, and design the table as shown in the following figure.

    3.png

    Select List in Data Setting for cell A1, as shown in the following figure.

     4.png

    Condition Attribute Adding

    Select cell A1, add a condition attribute, select Background from the attribute drop-down list, click Edit to select a color, and select Current Cell from the drop-down list. Set Common Condition to Common, and add two conditions, and currentValue Equal to '=A1[A1:+1]' and or currentValue Equal to '=A1[A1:-1]'. The two conditions are connected by OR.

    The description of the formula:

    A1[A1:+1]: To get the value of the cell immediately below the current cell.

    A1[A1:-1]: To get the value of the cell immediately above the current cell.

    iconNote:
    The example explains the vertically expanded data, where the values of vertically adjacent cells are the same.

    The following figure shows the steps.

     5.png

    Effect Display

    PC

    Save the report and click Pagination Preview. The effect is the same as that shown in section "Expected Effect."

    Mobile Terminal

    The template can be previewed on both the DataAnalyst app and the HTML5 terminal. The following figure shows the effect.

     6.jpg

    Template Download

    Attachment List


    Theme: Report Features
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy