Colours in Comments

AlexanderBB

Well-known Member
Joined
Jul 1, 2009
Messages
1,835
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Hi, I want to log what colours are used in various comments in a worksheet and was using
the command

= .Characters(1, 5).Font.Color (I think this gives the color of the first 5 chars and a Null if they're not the same . Is that right ?)

(Don't ask what goes before the first "." I tried to find out here here and never got a reply)

Anyway, it was all going well until suddenly it throws up 74. From Googling around the highest number expected was 56.

The actual color is black, or dark grey.

1) What woud it give an "outside-range" number (if that's what it is) ?
2) Is there list to be found that shows what number > 56 mean?

Thanks !!!
 
I'm afraid I can't offer any further advise.
Never had a need to worry about the colour number ...(y)
 
Upvote 0

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Would it help if you returned the RGB for ALL cells instead ??
If so , have a look here

Determining the RGB Value of a Color (Microsoft Excel)

If not convinced it would help, and although I haven't tried yet I don't see it correcting this '74' to the
right number to further process. Strange sort of problem this... pity no guru has offered any ideas. Might be worth
a question on Stack Overflow. BTW I did ran same routine on Excel 2007 and its results were different but also wrong. In Excel 2003
.color and .colorindex are the same. In 2007 they're not. .color is different, mostly its 0 but has also been a big number like 16711680. I didn't try to figure out why to preserve sanity!

But thanks for bouncing ideas and if I get any further I'll let you know.
Cheers, ABB
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,934
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top