Forum Discussion
Excel - Add value based on colour
Yes, it is possible to insert a value from a specific column in Excel if a cell has a certain color.
You can achieve this using an IF-THEN formula and conditional formatting .
Here’s an example: Suppose you have a table of data in column A and want to insert the value from column B if the cell in column A is red. You can use this formula:
=IF(COLOR(A1)=3,B1,"")
This formula checks if cell A1 is red (color code 3) and returns the value from B1 if it is.
I hope that helps!
NikolinoDE - Hi again, thank you!
I think I'm getting close, one last thing, my colour code is identified as #FADACD - When I used this in the formula the sheet is returning #NAME?. I took the # out of the formula but it didn't recognise it that way either?
- NikolinoDEMar 30, 2023Gold Contributor
- SarahJP1040Mar 31, 2023Copper Contributor
Hi NikolinoDE - I'm on Excel 365 so those colours aren't recognised and the formula won't accept the RGB code?
- FikturFoxMar 31, 2023Brass Contributor
Hi SarahJP1040
I'm not quite sure what you are trying to achieve here. But why not use your conditions in formatting the cells to peach?