Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
can i give a number an automatic colour on spreadsheet Jann Waterside Excel Worksheet Functions 2 January 21st 10 11:30 PM
Check colour of number, then populate cell KCG Excel Worksheet Functions 1 August 6th 07 02:50 PM
Change text colour according to number R.Demandt Excel Worksheet Functions 2 November 28th 06 08:24 AM
Colour cell when number changes Jolly Roger Excel Worksheet Functions 6 October 8th 06 11:25 PM
How to auto number cells that have colour Dave Excel Worksheet Functions 3 August 21st 05 09:11 AM


All times are GMT +1. The time now is 12:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"