Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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! |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
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! . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
can i give a number an automatic colour on spreadsheet | Excel Worksheet Functions | |||
Check colour of number, then populate cell | Excel Worksheet Functions | |||
Change text colour according to number | Excel Worksheet Functions | |||
Colour cell when number changes | Excel Worksheet Functions | |||
How to auto number cells that have colour | Excel Worksheet Functions |