HazardHouse
New Member
- Joined
- Apr 17, 2024
- Messages
- 5
- Office Version
- 365
- Platform
- Windows
Hello,
I have a situation where I would like to use a vlookup formula to return the format of a cell - specifically the fill color. From what I have found by doing a bit of research, this is not possible with a formula but seems to be possible with a macro. However, while I am generally pretty good with formulas, I have no experience with VBA.
The source data and colors are in Sheet 2. I want to be able to type a value in Sheet 1 and have adjacent cells return the cell color found next to the same value on Sheet 2. The colors cannot be determined based on a formula, so I cannot use conditional formatting. I need to be able to add values with new color codes as time goes on, and there could be hundreds of values/colors in the future. Many of these colors will be custom colors using Hex color codes (not sure if that matters).
See image. I made a very basic version of what I'm trying to do. I need Column B in Sheet 1 to paste the color from Column B in Sheet 2 based on the values in column A. There will be much more data than this, but I'm trying to confirm that I can achieve what I'm looking for before I spend the time creating the entire spreadsheet. In a perfect world, as I continue to add rows in Sheet 1 and type the ID # in column A, the Color field in Column B would automatically populate like a vlookup formula.
Thank you for any help and suggestions!
I have a situation where I would like to use a vlookup formula to return the format of a cell - specifically the fill color. From what I have found by doing a bit of research, this is not possible with a formula but seems to be possible with a macro. However, while I am generally pretty good with formulas, I have no experience with VBA.
The source data and colors are in Sheet 2. I want to be able to type a value in Sheet 1 and have adjacent cells return the cell color found next to the same value on Sheet 2. The colors cannot be determined based on a formula, so I cannot use conditional formatting. I need to be able to add values with new color codes as time goes on, and there could be hundreds of values/colors in the future. Many of these colors will be custom colors using Hex color codes (not sure if that matters).
See image. I made a very basic version of what I'm trying to do. I need Column B in Sheet 1 to paste the color from Column B in Sheet 2 based on the values in column A. There will be much more data than this, but I'm trying to confirm that I can achieve what I'm looking for before I spend the time creating the entire spreadsheet. In a perfect world, as I continue to add rows in Sheet 1 and type the ID # in column A, the Color field in Column B would automatically populate like a vlookup formula.
Thank you for any help and suggestions!