Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Colors in Cells....

Hi There!

Thank you in advanced for taking the time to read this.

We have some files that have to be colorful, long story
short.... How can we COPY a cell? I mean copy the value
and the color of it.

We know there is some VB code to get the color number of a
cell. But, how do we tell that cell to get the format or
color and the value, not just the value.

Any help or tips are highly appreciated!!

Best Regards.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Colors in Cells....

Mario,

You can use the Copy method. E.g.,
Range("A1").Copy destination:=Range("D5")


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Mario Manzano" wrote in message
...
Hi There!

Thank you in advanced for taking the time to read this.

We have some files that have to be colorful, long story
short.... How can we COPY a cell? I mean copy the value
and the color of it.

We know there is some VB code to get the color number of a
cell. But, how do we tell that cell to get the format or
color and the value, not just the value.

Any help or tips are highly appreciated!!

Best Regards.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Colors in Cells....

Hi Mario,

Mario Manzano wrote:
Thank you in advanced for taking the time to read this.

We have some files that have to be colorful, long story
short.... How can we COPY a cell? I mean copy the value
and the color of it.

We know there is some VB code to get the color number of a
cell. But, how do we tell that cell to get the format or
color and the value, not just the value.

Any help or tips are highly appreciated!!


here are two possibilities:

Range("A1").Copy Range("C10")
----

Dim rngSource As Range
Dim rngTarget As Range

Set rngSource = Range("A1")
Set rngTarget = Range("D1")

With rngTarget
.Value = rngSource.Value
.Interior.ColorIndex = rngSource.Interior.ColorIndex
.Font.Color = rngSource.Font.Color
End With

--
Regards
Melanie Breden
- Microsoft MVP für Excel -

http://excel.codebooks.de (Das Excel-VBA Codebook)

  #4   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Colors in Cells....

Thank you !! very, very
much!!

-----Original Message-----
Mario,

You can use the Copy method. E.g.,
Range("A1").Copy destination:=Range("D5")


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Mario Manzano" wrote in

message
...
Hi There!

Thank you in advanced for taking the time to read this.

We have some files that have to be colorful, long story
short.... How can we COPY a cell? I mean copy the value
and the color of it.

We know there is some VB code to get the color number

of a
cell. But, how do we tell that cell to get the format or
color and the value, not just the value.

Any help or tips are highly appreciated!!

Best Regards.



.

  #5   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Colors in Cells....

Melanie,

Thank you for your kindness!!


-----Original Message-----
Hi Mario,

Mario Manzano wrote:
Thank you in advanced for taking the time to read this.

We have some files that have to be colorful, long story
short.... How can we COPY a cell? I mean copy the value
and the color of it.

We know there is some VB code to get the color number

of a
cell. But, how do we tell that cell to get the format or
color and the value, not just the value.

Any help or tips are highly appreciated!!


here are two possibilities:

Range("A1").Copy Range("C10")
----

Dim rngSource As Range
Dim rngTarget As Range

Set rngSource = Range("A1")
Set rngTarget = Range("D1")

With rngTarget
.Value = rngSource.Value
.Interior.ColorIndex = rngSource.Interior.ColorIndex
.Font.Color = rngSource.Font.Color
End With

--
Regards
Melanie Breden
- Microsoft MVP für Excel -

http://excel.codebooks.de (Das Excel-VBA Codebook)

.

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
Counting Cells with colors JimW Excel Discussion (Misc queries) 7 September 1st 09 01:05 AM
Sum Cells with colors taxmom Excel Worksheet Functions 9 October 10th 06 05:51 PM
Sorting Cells by Colors swiftcode Excel Discussion (Misc queries) 2 September 26th 05 10:53 AM
2 cells 2 colors Soundman Excel Discussion (Misc queries) 3 July 19th 05 01:05 AM
Sum cells in different colors heater Excel Discussion (Misc queries) 1 June 21st 05 06:25 PM


All times are GMT +1. The time now is 05:49 AM.

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

About Us

"It's about Microsoft Excel"