Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA colorscale and color #

hi,
i have a colorscale (conditional formating ) in range A1:A20 and I'm
trying to get color number for each cell. In normal case

a = Range("a1").Interior.Color
b= Range("a2").Interior.Color etc.

works fine.
But when colors of cells are from conditional formating i dont know
how to get color number.
how to do that?
Mistus

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default VBA colorscale and color #

Sadly getting the conditional format colour is not the same as returning the
colorindex. have a look he-

http://www.cpearson.com/excel/CFColors.htm

Mike

"mistus" wrote:

hi,
i have a colorscale (conditional formating ) in range A1:A20 and I'm
trying to get color number for each cell. In normal case

a = Range("a1").Interior.Color
b= Range("a2").Interior.Color etc.

works fine.
But when colors of cells are from conditional formating i dont know
how to get color number.
how to do that?
Mistus


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA colorscale and color #

http://www.cpearson.com/excel/CFColors.htm

it did't solve my problem :(. "Function ColorOfCF" is very useful but it
works only for stadnard formating (the same as a =
Range("a1").Interior.Color). maybe I sholud write that I use excel 2007

M



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default VBA colorscale and color #

It's not simple but see
http://www.xldynamic.com/source/xld.CFConditions.html

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"mistus" wrote in message
oups.com...
hi,
i have a colorscale (conditional formating ) in range A1:A20 and I'm
trying to get color number for each cell. In normal case

a = Range("a1").Interior.Color
b= Range("a2").Interior.Color etc.

works fine.
But when colors of cells are from conditional formating i dont know
how to get color number.
how to do that?
Mistus



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default VBA colorscale and color #

See my post, that site covers formulae as well.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Marcin" wrote in message
...
http://www.cpearson.com/excel/CFColors.htm


it did't solve my problem :(. "Function ColorOfCF" is very useful but it
works only for stadnard formating (the same as a =
Range("a1").Interior.Color). maybe I sholud write that I use excel 2007

M







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 227
Default VBA colorscale and color #

For what it's worth, if my VBA code needs to worry about the CF
coloring in a cell, I just make the same tests in VBA as I do in the
CF and go from there.

Mark Lincoln

On Jul 19, 8:47 am, mistus wrote:
hi,
i have a colorscale (conditional formating ) in range A1:A20 and I'm
trying to get color number for each cell. In normal case

a = Range("a1").Interior.Color
b= Range("a2").Interior.Color etc.

works fine.
But when colors of cells are from conditional formating i dont know
how to get color number.
how to do that?
Mistus



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
Powerpoint / Excel: custom pp RGB color doesn't match identical Excelcustom RGB color mikewillnot Charts and Charting in Excel 1 February 26th 08 05:22 PM
Can't format cell color/text color in Office Excel 2003 in files . albertaman Excel Discussion (Misc queries) 0 February 16th 06 03:56 AM
My fill color and font color do not work in Excel Std Edition 2003 chapstick Excel Discussion (Misc queries) 1 September 11th 05 08:48 PM
Excel 2003 will not display color fonts or color fill cells DaveC Excel Worksheet Functions 1 April 11th 05 04:38 PM
Browse Forms Controls and change TextBox color based on cell color StefanW Excel Programming 2 November 21st 04 07:06 PM


All times are GMT +1. The time now is 08:29 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"