I have a spreadsheet which cells in are colored meaningfully.
Does any body know how i can return the background color value of a current cell in Excel sheet?
Procedure of acquiring cell color (background color) Open Excel in the Excel Application Scope activity. Place a Get Cell Color activity inside the Excel Application Scope activity. 2. Set the properties of the Get Cell Color activity.
Apply an If-Then rule to all cells by pressing “Ctrl-A” before assigning your rule. If you copy values from colored cells and paste them into new it new cells, the new cells acquire the color of the copied cell.
Select the cell or range of cells you want to format. Click Home > Format Cells dialog launcher, or press Ctrl+Shift+F. On the Fill tab, under Background Color, pick the color you want. To use a pattern with two colors, pick a color in the Pattern Color box, and then pick a pattern in the Pattern Style box.
You can use Cell.Interior.Color
, I've used it to count the number of cells in a range that have a given background color (ie. matching my legend).
If you are looking at a Table, a Pivot Table, or something with conditional formatting, you can try:
ActiveCell.DisplayFormat.Interior.Color
This also seems to work just fine on regular cells.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With