How to Copy Cell Background Colors with an Excel Lookup
Question details
The user wants to know how to carry over the background color of a source cell when returning values using a lookup formula in Excel.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Retrieving data from another worksheet or table using lookup formulas while trying to retain the visual formatting of the original data.
- Observed behavior
- Excel lookup formulas successfully retrieve the cell value, but they do not automatically reproduce the source cell's background color or other formatting.
Check your source data to determine whether the background colors were applied manually or generated automatically through conditional formatting, as this determines the solution you need.
Duplicate the Conditional Formatting Rules
If the source cell colors are generated by conditional formatting, the best approach is to apply identical formatting rules to your lookup destination cells.
Standard formulas in Excel, such as VLOOKUP, INDEX, or MATCH, are designed strictly to pull data values. They cannot fetch or replicate formatting properties like font color or background color.
However, if your source data is colored based on logical rules (e.g., values over 100 are red), you can simply recreate those exact rules on the cells containing your lookup formulas.
Highlight the range of cells where you have entered your lookup formulas.
Navigate to the Home tab on the Excel ribbon and click on 'Conditional Formatting'.
Click 'New Rule' from the dropdown menu, then select 'Use a formula to determine which cells to format' or choose the appropriate preset rule that matches your source data.
Input the logic criteria, click the 'Format' button to select the matching background color from the Fill tab, and click 'OK' to apply.

Use VBA Macro for Manually Formatted Cells
If the background colors in your source data were applied manually (using the Fill Color tool), you must use a VBA macro to copy the formatting.
Manage Data and Formatting Efficiently in WPS Spreadsheet
WPS Spreadsheet provides powerful data lookup functions and an intuitive conditional formatting engine to help you manage dynamic data effortlessly. Easily retrieve values and apply intelligent color rules.
- 1. Open WPS Spreadsheet: Launch WPS Office and open your workbook in the Spreadsheet module.
- 2. Insert Your Lookup Formula: Select the destination cell and type your preferred lookup formula (such as =VLOOKUP) to retrieve your data.
- 3. Apply Color Rules: Go to the Home tab, click 'Conditional Formatting', and establish the same logical rules used in your source data to ensure colors match automatically.

Frequently Asked Questions
Can VLOOKUP copy cell background color directly?
No. Standard Excel functions like VLOOKUP, HLOOKUP, and XLOOKUP can only return cell values. They do not have the capability to extract or return cell formatting such as background colors, borders, or font styles.
Is there a formula to return cell color in Excel?
Excel does not have a built-in formula function to return a cell's color index. To read a cell's color, you must use VBA (Visual Basic for Applications) or Excel 4.0 macro functions (like GET.CELL), though conditional formatting is the preferred modern approach.
How do I manually copy cell formatting without formulas?
You can quickly copy manual formatting using the Format Painter tool. Select the source cell with the desired background color, click the Format Painter icon (paintbrush) on the Home tab, and then click your destination cell.




