How to Calculate Overall Red, Amber, Green (RAG) Status in Excel
Question details
The user needs a formula to automatically determine an overall project RAG (Red, Amber, Green) status based on multiple sub-indicators, with specific priority rules for primary metrics.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Tracking project health where primary indicators (Scope, Schedule, Benefits, Costs) heavily influence the overall status, but secondary indicators (Resources) should not trigger a high-alert status on their own.
- Observed behavior
- The goal is to automatically output 'Red', 'Amber', or 'Green' based on a customized logical hierarchy rather than a simple average or uniform weighting.
Ensure your project tracking worksheet has clear columns for Scope, Schedule, Benefits, Costs, and Resources, and that their status values are entered as exact text strings ('Red', 'Amber', 'Green').
Use Nested IF, OR, and COUNTIF Functions for RAG Logic
Apply a combined logical formula to prioritize primary indicators over secondary ones for calculating the overall project status.
To satisfy the requirement where 'Resources' alone cannot trigger a Red or Amber status, we can use a nested IF statement combined with OR and COUNTIF functions.
The logic dictates that the overall status becomes Red if any primary indicator (Scope, Schedule, Benefits, Costs) is Red, or if at least three total indicators are Red. It becomes Amber if any primary indicator is Amber, or if at least one Red remains across the board. Otherwise, it defaults to Green.
Assume your headers are in row 1, and your data starts in row 2. Set your columns in this order: Scope (B2), Schedule (C2), Benefits (D2), Costs (E2), and Resources (F2).
Select the cell where you want the overall status to appear (e.g., G2). Type the following formula exactly: =IF(OR(B2="Red",C2="Red",D2="Red",E2="Red",COUNTIF(B2:F2,"Red")>=3),"Red",IF(OR(B2="Amber",C2="Amber",D2="Amber",E2="Amber",COUNTIF(B2:F2,"Red")>1),"Amber","Green"))
Press Enter to calculate the result for the first row. Click on the bottom-right corner of the cell (fill handle) and drag it down to apply the formula to the rest of your project data.

Calculate Complex Project Statuses with WPS Spreadsheet
WPS Spreadsheet fully supports advanced logical functions like IF, OR, and COUNTIF, allowing you to seamlessly manage your project trackers and dynamic RAG status dashboards with ease.
- 1. Open your project file: Launch WPS Spreadsheet and open your existing project tracker document.
- 2. Input the logic formula: Select the target cell for the Overall Status and paste the provided nested IF/OR formula to calculate your RAG priority.
- 3. Format as a visual dashboard: Go to the Home tab, select Conditional Formatting, and apply color scales or highlight rules to automatically color-code the Red, Amber, and Green text.
- 4. Save and share: Save your updated dashboard as a standard .xlsx file, ensuring full compatibility when sharing with clients or team members.

Frequently Asked Questions
How can I automatically color the cells based on the RAG status result?
You can use Conditional Formatting. Select the column with your overall statuses, go to the Home tab > Conditional Formatting > Highlight Cells Rules > Equal To. Type 'Red' and choose a red fill. Repeat the process for 'Amber' (yellow/orange fill) and 'Green'.
What if I want to add more secondary indicators to the formula?
You can easily expand the formula. Increase the COUNTIF range (for example, change B2:F2 to B2:G2 if you add a new column in G) and adjust the numerical thresholds (like >=3) to fit the new logic requirements of your expanded dataset.
Why is the formula returning an error or unexpected Green status?
Check for typos or extra spaces in your data cells. The formula looks for exact text matches like 'Red' or 'Amber'. If a cell contains 'Red ' (with a trailing space), the formula will not recognize it and may default the result to 'Green'. You can use the TRIM function to clean up your data if necessary.




