January 13, 2023
I am very new to VBA so I'm struggling with something I'm trying to do.
In my spreadsheet I was to detect when the color of a cell has changed. The change is always made by a user and not a formula. I'm using Office 356.
My end goal is to create a running total of expenses excluding those that are pending but not paid. All pending and not paid have a yellow background. Once the expense is paid the yellow background is removed manually.
In advance, thank you for your help
Trusted Members
Moderators
November 1, 2018
Changing the colour of a cell does not trigger any events that you can respond to. If you can, you would be far better off using an additional column/cell to hold the status. You can then sum based on that column using normal formulas, and you can also colour the cell(s) based on the selected status using conditional formatting.
Trusted Members
October 17, 2018
January 13, 2023
Since I posted this question, I actually found a solution that almost satisfies the question. This function works:
=GET.CELL(63,INDIRECT("rc, FALSE)) in that it will put a number in a cell based on the background color of the cell. One of the problems with this function is that it doesn't auto recalculate when the color changes, the whole worksheet needs to recalculate. It also needs to be placed in the Name Manager and called indirectly.
Sorry about the transposition in the original posting, I'm using Office 365 not Office 356.
This question can now be considered closed.
1 Guest(s)