Excel script for filling cells within a specified range with a specific fill color if any cell within the range is selected

Anonymous
2024-03-28T21:03:09+00:00

Using scripts in Excel (NOT VB macros), I need to be able to fill any cell within a specified range with a specific color if any cell within the range is selected ("clicked on"). Note that the spreadsheet will have different columns that need to be different colors. For example, if any cell in range B3:B100 is selected, the cell should fill yellow (without needing to type anything). If any cell in range C3:C100 is selected, the cell should fill green. If any cell in the range D3:D100 is selected, the cell should fill red. I used a VB macro which worked fine on a desktop or laptop, but I need this functionality to work specifically on cell phones (iOS or Android) and tablets so VB macro is not a viable solution. Below is the VB macro I wrote:

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-03-29T02:30:53+00:00

    I‘d suggest you create a new thread in Office Development which is special channel to handle Office Script Question.

    Office Development - Microsoft Q&A

    Thank you for your unstanding.

    0 comments No comments