+ Reply to Thread
Results 1 to 3 of 3

Match Date Columns With Code

  1. #1
    Forum Contributor
    Join Date
    03-14-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    491

    Match Date Columns With Code

    I want a vba code that can match the dates in column G & J

    If there is a match I want the format to be the same as cell C8
    if not, then the formatting should match C10

    see attached workbook.

    this is by far the hardest loops for me.

    Please help
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Match Date Columns With Code

    This could be achieved using the Conditional Formatting feature

    Select column G and select from the menu Conditional Formatting
    Green format Formula is: =AND(ISNUMBER(G1),COUNTIF($J:$J,INT(G1)))
    Pink format Formula is: =ISNUMBER(G1)
    OK

    Select column J and select from the menu Conditional Formatting
    Green format Formula is: =AND(ISNUMBER(J1),COUNTIFS($G:$G,">="&INT(J1),"<"&INT(J1)+1))
    Pink format Formula is: =ISNUMBER(J1)
    OK
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    03-14-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    491

    Re: Match Date Columns With Code

    Quote Originally Posted by AlphaFrog View Post
    This could be achieved using the Conditional Formatting feature

    Select column G and select from the menu Conditional Formatting
    Green format Formula is: =AND(ISNUMBER(G1),COUNTIF($J:$J,INT(G1)))
    Pink format Formula is: =ISNUMBER(G1)
    OK

    Select column J and select from the menu Conditional Formatting
    Green format Formula is: =AND(ISNUMBER(J1),COUNTIFS($G:$G,">="&INT(J1),"<"&INT(J1)+1))
    Pink format Formula is: =ISNUMBER(J1)
    OK
    Do you have screen shots of this?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] INDEX date that MATCH on date range, MATCH code(string)
    By Dahlia in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-23-2014, 03:33 AM
  2. [SOLVED] VBA Code to Extract complete row if the criteria did not match with 4 columns
    By hecgroups in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-26-2012, 01:30 PM
  3. Match on Rows and Columns &Copy/Paste-VBA code
    By npitts in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-05-2012, 03:21 PM
  4. Replies: 1
    Last Post: 01-19-2012, 02:31 PM
  5. Code req for returning results of a close match if two other columns match exactly
    By davidparkes in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-23-2010, 12:00 PM

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