Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Copy Column and Paste

Im using the following macro

Sub AddColumnt(
ActiveCell.Offset(0, 1).EntireColumn.Inser
Range("A1:A10").Copy ActiveCell.Offset(0, 1
End Su
It copies A1:A10 and inserts column and paste next to active cell

Cell A5 has a formula as well as conditional formatting using isformula UDF. The cell is colored yellow and if there is a formula it is white, so at the time of copy it is white. (Im' trying to see that user has over tpyed foormula). The copy picks up the CF but it doesnt pick up the cell color. Seems as though I can get the formula and the CF but not the cell color. What can I add to pick up that color as well as the CF

Many Thank
Steve
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Copy Column and Paste

Conditional formatting produces a color based on the condition in the
formula. So if you want the color, you need to reproduce the conditions
that produce it. If your formula is absolute, it should evaluate to the
same condition as A5. If not, then it won't - it will look relative to its
current location.

--
Regards,
Tom Ogilvy




steveh wrote in message
...
Im using the following macro

Sub AddColumnt()
ActiveCell.Offset(0, 1).EntireColumn.Insert
Range("A1:A10").Copy ActiveCell.Offset(0, 1)
End Sub
It copies A1:A10 and inserts column and paste next to active cell.

Cell A5 has a formula as well as conditional formatting using isformula

UDF. The cell is colored yellow and if there is a formula it is white, so
at the time of copy it is white. (Im' trying to see that user has over tpyed
foormula). The copy picks up the CF but it doesnt pick up the cell color.
Seems as though I can get the formula and the CF but not the cell color.
What can I add to pick up that color as well as the CF.

Many Thanks
Steve



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Copy Column and Paste

So....I have a formula in A5 and the cell meets CF and is white (which is good) and that is copied over by the macro. But when the formula is deleted out of the column that is copied and pasted it doesnot change to the 'base' (yellow) color of the copied cell. I guees Im correct in saying that I can't have the CF and the base color as well? Maybe mamma was right when she said I cant have my cake and eat it too?
Thanks!!!!
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
Copy a column and paste to another tab to save the data for each m liem Excel Discussion (Misc queries) 3 January 17th 10 03:14 AM
Why won't the copy/paste from PDF retain the row/column in excel? checkQ Excel Discussion (Misc queries) 4 September 2nd 08 04:33 PM
copy data and formulas from a column and paste into a row john.laffe[_2_] Excel Worksheet Functions 1 December 12th 07 02:59 PM
Copy and paste from last record at bottom of column [email protected] New Users to Excel 0 February 7th 06 10:25 PM
Copy contents in a row and paste in a column CJMFH Setting up and Configuration of Excel 1 July 15th 05 03:14 PM


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