+ Reply to Thread
Results 1 to 5 of 5

Conditional format in macro, does not fully work

  1. #1
    Registered User
    Join Date
    02-10-2011
    Location
    Belgium
    MS-Off Ver
    Excel 2003
    Posts
    3

    Conditional format in macro, does not fully work

    Hello, I'm new at this forum and in need of help.

    I'm trying to compare one range of cells (RANGE 1) with another range of cells (RANGE 2), using conditional format I would like to highlight the cells with the same value in RANGE 1 and RANGE 2.

    So I select RANGE 1 --> Conditional format -->"Formula is" and fill in: "=or(value(A1)=value(RANGE 2))". With A1 being a cell of RANGE 1, give it a color format and apply.

    The cells in RANGE 1 that have the same value in RANGE 2 are now highlighted. So far so good.

    But if I do the exact same thing while recording a macro, and I start the macro, only A1 is highlighted and the other cells that should als be highlighted are not. They are only highlighted after I open the conditional format in each individual cell and just pressing ok.

    You can see it in the excel file I'm attaching.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: Conditional format in macro, does not fully work

    Hi,
    See if this works for you
    Please Login or Register  to view this content.
    Last edited by davesexcel; 02-10-2011 at 06:47 AM.

  3. #3
    Registered User
    Join Date
    02-10-2011
    Location
    Belgium
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Conditional format in macro, does not fully work

    Thanks for the reply, I forgot to say that I kinda suck at VB.

    So when pasting your code in VB editor, this line

    Please Login or Register  to view this content.
    gets highlighted in yellow.

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: Conditional format in macro, does not fully work

    I pasted the code again, give it another try.

    Here's you book back
    Attached Files Attached Files
    Last edited by davesexcel; 02-10-2011 at 06:55 AM.

  5. #5
    Registered User
    Join Date
    02-10-2011
    Location
    Belgium
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Conditional format in macro, does not fully work

    It works now, the problem was the comma separator, apparantly in europe we work with ; as a separator.
    Thanks a lot. I'll have another go at it after lunch break.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1