Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Copy Formatting of Cell

Hi
not possible with formulas/user defined functions as they can only
return values

--
Regards
Frank Kabel
Frankfurt, Germany

"WintonCW" schrieb im Newsbeitrag
...
I am copying data from one sheet to another. I have used the

=VLOOKUP () to find the data which is working nicely. However, is
there any way to copy the formatting of the entire cell that I've found
(ie -- background color)? I'm guessing I"ll have to write my own
macro, so any help on this would be greatly appreciated. Thank you!



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Copy Formatting of Cell

All right -- any suggestions for what to do? I'm pretty hesitant to copy each cell's characteristic individually as this is a sizeable -- and variable -- sheet.

Thank you
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Copy Formatting of Cell

Hi
if you want to copy the formats for many cells you may have a look at
'Edit - Paste Special - Formats'. If this is not what you're looking
for you may explain with some more detail how you ant to copy and if
this is a one-time operation of if you want to change the formats
automatically if the source formats changes

--
Regards
Frank Kabel
Frankfurt, Germany

"WintonCW" schrieb im Newsbeitrag
...
All right -- any suggestions for what to do? I'm pretty hesitant to

copy each cell's characteristic individually as this is a sizeable --
and variable -- sheet.

Thank you


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Copy Formatting of Cell

I ended up finally writing a macro that would do the trick:


'fromCell is found using a Cells.Find()
'toCell is assigned

Sub Fill(fromCell, toCell)
With toCell
.Value = fromCell.Value
.Interior.ColorIndex = fromCell.Interior.ColorIndex
.Interior.Pattern = fromCell.Interior.Pattern
End With
End Sub

*** 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
Excel UDF copy cell with formatting dotants Excel Discussion (Misc queries) 2 March 16th 10 02:02 PM
In a formula, copy the value and formatting of another cell papakfl Excel Worksheet Functions 4 April 29th 07 02:22 PM
Copy data to new cell but with different formatting chiefwidmer Excel Discussion (Misc queries) 3 April 12th 07 10:09 PM
How do I copy formatting in a cell reference san jose native Excel Discussion (Misc queries) 1 June 30th 05 06:40 AM
Copy cell with individual formatting Arkaad Excel Programming 5 October 20th 03 09:08 PM


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