Re: Code instead of copy n' paste the conditional format by hand

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

Nobody_at_all.se
Date: 05/03/04


Date: Mon, 03 May 2004 15:50:55 GMT

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" <frank.kabel@freenet.de> skrev i meddelandet
news:785701c43123$2f369860$a601280a@phx.gbl...
> 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
> >
> >
> >.
> >



Relevant Pages

  • Re: Date Format Thingymabob
    ... and the new date enters "I1" and at the same time the Format of Text on ... Have you got the textbox bound to the cell via ControlSource? ... This is driving me crazy -- I have used Bob Phillips Date SpinButton ... Private Sub SB3_Spinup ...
    (microsoft.public.excel.programming)
  • Re: Macro to run based on drop down list
    ... Private Sub Worksheet_Change ... I used A1 as the cell with data|validation and changed the format for cell C3. ... "Dave Peterson" wrote: ...
    (microsoft.public.excel.programming)
  • Re: Date Format
    ... The code searches a previous entries, if a condition is met the date is copied from a previous cell and pasted into the ActiveCell, if the condition is not met, the date is manually typed in. ... with receivingCell ... Sub Auto_Open ... One column contains a Custom date format dd/mm/yy set to the United Kingdom ...
    (microsoft.public.excel)
  • Re: Replace Macro
    ... Sub Macro1() ... formatting a cell after an entry does not change the contents of the cell ... display), then the value shown in the formulabar was 18:12:20 and there ... Or if your data is all times, you could format the range as General, do ...
    (microsoft.public.excel.misc)
  • RE: Concatenation within a macro
    ... Sub put_um ... concatenated vertically into each cell. ... I have a large data set that is automatically formatted by a macro. ... matter if the macro attempts to format cells with no data in them. ...
    (microsoft.public.excel)