Results 1 to 2 of 2

Thread: Conditional formatting doesn't move with macro
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Jun 2016
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Conditional formatting doesn't move with macro

    I'm not a whiz at Excel and I asked a friend to write me a macro so I can press a button that moves the previous weeks worth of cells to a sperate tab and then another button so I can move them back to the main tab if need be. All that works fine until I decided to add conditional formatting to the cells on the main tab which changes the colour of each cell depending on what information I choose from the dropdown box. It looks ok and then I press the move a week button and the conditional formatting is all over the place in the separate tab and if I press the button to move it back the conditional formatting formula has jumped a week and remains where it was when I moved forward a week

    Any ideas how I can sort this out so that the conditional formatting moves with the macro?
    Thank you

  2. #2
    Board Regular Gerald Higgins's Avatar
    Join Date
    Mar 2007
    Location
    Edinburgh
    Posts
    9,115
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Conditional formatting doesn't move with macro

    Hi, you could add some code to your existing macro so that it sets up the correct Conditional Formating in the area that you move your data TO, and maybe also deletes it from the area you are moving it FROM.

    It's difficult to describe exactly how to do this without knowing what CF you want to apply, but you could try using the Marco Recorder while you make these changes manually, and play around with the results.
    The following is my SIGNATURE. It's not part of any question or solution I'm posting. If it IS your solution, you've got a very weird problem !

    Sub Macro()
    ActiveCell = "IY" & Right(Application.Name, 5)
    With ActiveCell.Characters(Start:=2, Length:=1).Font
    .Name = "Webdings"
    .Color = 255
    End With
    End Sub

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •