Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

How to vlookup and return background color along with background color?


Asked by Zendaya Grant on Nov 30, 2021 FAQ



Select a blank cell adjacent to the lookup value, and then enter formula =LookupKeepColor (E2,$A$1:$C$8,3) into the Formula Bar, and then press the Enter key.
Consequently,
Re: Retrieve Cell Background Colour in a VLOOKUP Formula. The cell coloring is not a part of cell content, and not directly available to Calc functions. If the color is set by a conditional format, you can use a corresponding condition in the target cell. There are solutions available by installing some plugin.
Additionally, To do this, Select cells E3:E10 Click Home > Conditional Formatting > Add New Rule. In the New Formatting Rule dialog box, click Use a formula to determine which cells to format. Under Format values where this formula is true, type the formula: “=ABS(E3-VLOOKUP(B3,$H$3:$I$10,2,FALSE))<=10” Click Format. In the Color box, select Green.
Thereof,
Please do as follows to lookup a value and return its corresponding value along with background color in Excel. 1. In the worksheet contains the value you want to vlookup, right-click the sheet tab and select View Code from the context menu. See screenshot: 2.
Subsequently,
Any form of VBA is going to be slow, especially if it has to work on change events. Added to which there is no-way a macro knows if you have changed the colour of a cell. The only realistic way would be to use a macro that you run from time to time.