Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Code instead of copy n' paste the conditional format by hand

Hi there!

If you know this trick, please help me! I have killed a lot of time...

To be able to keep formats in my B:B row, I use the contitional format
function. When I use a relative formula like =$A6="I" everything work fine
( yellow interior color when "I", Black interior when "K".) . I just copy
the format manually to all cells and the relative row fill out the area.

However, I had to create code for it, running everytime with "Sub
Worksheet_Change". This because I need to keep the formats when i paste text
from other worksheets. If I have code activating when I change information,
I can reformat the cell right again .

Earlier I used a workaround.and disabled copy and paste instead, but you
lose a lot with that...

/Regards


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Code instead of copy n' paste the conditional format by hand

Hi
and what is exactly what you need? The complete code?

-----Original Message-----
Hi there!

If you know this trick, please help me! I have killed a

lot of time...

To be able to keep formats in my B:B row, I use the

contitional format
function. When I use a relative formula like =$A6="I"

everything work fine
( yellow interior color when "I", Black interior

when "K".) . I just copy
the format manually to all cells and the relative row

fill out the area.

However, I had to create code for it, running everytime

with "Sub
Worksheet_Change". This because I need to keep the

formats when i paste text
from other worksheets. If I have code activating when I

change information,
I can reformat the cell right again .

Earlier I used a workaround.and disabled copy and paste

instead, but you
lose a lot with that...

/Regards


.

  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Code instead of copy n' paste the conditional format by hand

Well, let me develop it and you or somebody else might start with a hint? I
appreciate all suggestions.

I don't want to run the code through all rows every time a change in the
worksheet take place - it will "shake all the" time in that case...I just
want to make a check in the cell to the left for that specific row the
change took place, if that is possible.

I have tried to start from a macro when recording format conditioning in
excel. A part of it look of cource like this:
...
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$A$6:$A$102=""I"""
With Selection.FormatConditions(1).Font
.Bold = True
.Italic = False
.ColorIndex = 36
End With
.... etc

If I want to run code with Sub Worksheet_Change, I guess I had to have a
compleate other approach than "=$A$6:$A$102=""I""" Right?

Can you or any else give me a hint of the approach?

/
Regards



"Frank Kabel" skrev i meddelandet
...
Hi
and what is exactly what you need? The complete code?

-----Original Message-----
Hi there!

If you know this trick, please help me! I have killed a

lot of time...

To be able to keep formats in my B:B row, I use the

contitional format
function. When I use a relative formula like =$A6="I"

everything work fine
( yellow interior color when "I", Black interior

when "K".) . I just copy
the format manually to all cells and the relative row

fill out the area.

However, I had to create code for it, running everytime

with "Sub
Worksheet_Change". This because I need to keep the

formats when i paste text
from other worksheets. If I have code activating when I

change information,
I can reformat the cell right again .

Earlier I used a workaround.and disabled copy and paste

instead, but you
lose a lot with that...

/Regards


.



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
Code to conditional format all black after date specified in code? wx4usa Excel Discussion (Misc queries) 3 December 26th 08 07:06 PM
copy conditional formatting, paste format without conditions jasonr17 Excel Discussion (Misc queries) 6 May 2nd 08 05:52 PM
Copy/Paste Conditional Format Paul Excel Discussion (Misc queries) 2 June 20th 07 10:13 AM
Is it possible to copy a conditional format formula as paste value Francois via OfficeKB.com Excel Discussion (Misc queries) 2 September 22nd 06 09:40 AM
Copy & paste conditional format WCDoan New Users to Excel 2 July 27th 06 09:40 PM


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