Share via

Macro Request: Colour-Coding based on Input, Formula or Link

Anonymous
2013-11-01T04:41:41+00:00

Hi,

I'm looking to insert a macro in excel that would colour-code numbers based on the following requirements:

  • Blue: hard-coded numbers
  • Black: formulas (ex. sum, vlookup, average, etc)
  • Green: number that is linked from another sheet within the same file
  • Red: number that is linked from another sheet from an exterior file
  • Colour-coding done upon data entry rather than re-running macro
  • Only numbers would be colour-coded, all textual inputs remain in black

Thanks in advance,

Virinder

Microsoft 365 and Office | Excel | For home | 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

4 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Anonymous
    2013-11-02T22:26:48+00:00

    The macro mostly works; when I run it I get a run-time error (1004). When I click debug, the following part of the code is highlighted in yellow

    For Each r In ActiveSheet.Cells.SpecialCells(xlCellTypeFormulas)

    Also, it doesn't auto color upon entry. I installed the code as an add-in and creating a shortcut (Ctrl + w) to run it, could this be causing the problem?

    Thanks,

    Virinder

    Was this answer helpful?

    0 comments No comments
  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  4. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more