![]() |
Colour number...
Howdie,
If a cell has been coloured, and I want to replace all the colours to a new colour, I think I can do a find and replace for that colours number... but where do u see its number? (not under properties...?) Thanks D *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Colour number...
Hi
AFAIK you can't do this. You have to loop through all cells -- Regards Frank Kabel Frankfurt, Germany "Darin Kramer" schrieb im Newsbeitrag ... Howdie, If a cell has been coloured, and I want to replace all the colours to a new colour, I think I can do a find and replace for that colours number... but where do u see its number? (not under properties...?) Thanks D *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Colour number...
you need a custom function
function Mycolor(cell as range) Mycolor=c.interior.colorindex end function "Frank Kabel" wrote in message ... Hi AFAIK you can't do this. You have to loop through all cells -- Regards Frank Kabel Frankfurt, Germany "Darin Kramer" schrieb im Newsbeitrag ... Howdie, If a cell has been coloured, and I want to replace all the colours to a new colour, I think I can do a find and replace for that colours number... but where do u see its number? (not under properties...?) Thanks D *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Colour number...
Darin,
You cannot do a Find on a colour (either its number, or is colour id). What you can do is get the colorindex of a particular cell with this code Activecell.Interior.ColorIndex To reset coloured cells in a selected range use For Each cell In Selection If cell.Interior.Colorindex = findColour Then cell.Interior.Colorindex = replaceColour End If Next cell -- HTH RP (remove nothere from the email address if mailing direct) "Darin Kramer" wrote in message ... Howdie, If a cell has been coloured, and I want to replace all the colours to a new colour, I think I can do a find and replace for that colours number... but where do u see its number? (not under properties...?) Thanks D *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Colour number...
hi,
in a blank workbook, paste the following code. to call the vb window press alt+F11 Sub macGetColors() ' Macro written 2/10/02 by FSt1 Sheets("Sheet1").Select Range("B2").Select Set ci = Range("A1") ci.Value = 1 Set c = Range("B2") Do Until ci 56 Set c2 = c.Offset(1, 0) Set cnum = c.Offset(0, 1) c.Interior.ColorIndex = ci.Value c.Offset(0, 1) = ci.Value ci.Value = ci.Value + 1 Set c = c2 c.Select Loop End Sub It will create a list of all colors and their indexes. good luck. -----Original Message----- Howdie, If a cell has been coloured, and I want to replace all the colours to a new colour, I think I can do a find and replace for that colours number... but where do u see its number? (not under properties...?) Thanks D *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! . |
All times are GMT +1. The time now is 06:34 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com