How to Use Excel Conditional Formatting for Height and Waist Measurements
Question details
Color-code a waist measurement cell green, yellow, or red based on a person's height and corresponding health thresholds.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Setting up a health tracker where waist measurement inputs are evaluated against dynamic height-based criteria to indicate ideal, caution, or obese ranges.
- Observed behavior
- The user needs a method to dynamically format the waist measurement cell using lookup thresholds without relying on VBA macros.
Ensure you have created a clear reference table in your worksheet that lists heights alongside their respective caution (yellow) and high-risk (red) waist measurement thresholds.
Apply Conditional Formatting Using VLOOKUP
Use VLOOKUP formulas inside conditional formatting rules to dynamically compare waist measurements against height thresholds.
This approach avoids VBA entirely by using a standard lookup table. You will set a default 'safe' color and layer formula-based rules on top for the higher thresholds.
Select your target waist measurement cell (e.g., E9). Go to the Home tab and use the Fill Color tool to set its background to Green.
With the cell still selected, click 'Conditional Formatting' > 'New Rule' > 'Use a formula to determine which cells to format'. Enter `=E9>=VLOOKUP(E7,$I$2:$K$10,2)` (assuming E7 is the height, and column 2 is the caution threshold). Click 'Format' and choose a Yellow fill.
Add another new rule using the formula `=E9>=VLOOKUP(E7,$I$2:$K$10,3)` (where column 3 is the red/obese threshold). Set the format to a Red fill.
Navigate to 'Conditional Formatting' > 'Manage Rules'. Ensure that the Red rule is positioned above the Yellow rule so it triggers correctly when the highest threshold is met.

Easily Apply Conditional Formatting in WPS Spreadsheet
WPS Spreadsheet fully supports complex conditional formatting with VLOOKUP, allowing you to easily build dynamic health tracking tables. Enjoy a smooth, familiar interface that handles advanced formulas with ease.
- 1. Open your tracking file: Launch WPS Spreadsheet and open the workbook containing your health tracking data and lookup tables.
- 2. Select the target cells: Highlight the waist measurement cells that need to be dynamically formatted.
- 3. Apply formatting rules: Navigate to the Home tab, click Conditional Formatting, and use the New Rule option to input your VLOOKUP formulas exactly as you would in standard Excel.

Frequently Asked Questions
Why is my conditional formatting applying the yellow color instead of red for high values?
This usually happens when the conditional formatting rules are out of order. Rules are evaluated top-to-bottom. Open the Conditional Formatting Rules Manager and ensure your rule for the highest threshold (Red) is placed above the caution threshold (Yellow).
Can I use XLOOKUP instead of VLOOKUP for conditional formatting?
Yes, if your spreadsheet software supports XLOOKUP, you can use it within the conditional formatting formula to retrieve the threshold values. The logic remains exactly the same: compare the cell value against the lookup result.
Do I need absolute references in my lookup formula?
Yes, it is highly recommended to use absolute references (like $I$2:$K$10) for your lookup table range. This ensures the reference range does not shift if you use the Format Painter to apply the formatting to other rows.




