+ Reply to Thread
Results 1 to 5 of 5

compare dates in column with unique date on current month

  1. #1
    Forum Contributor
    Join Date
    10-08-2013
    Location
    Chennai, INDIA
    MS-Off Ver
    Excel 2010
    Posts
    157

    Question compare dates in column with unique date on current month

    Best Wishes to all,

    I have attached an excel contains in
    Col A - Name
    Col B - Status (pending, hold, done...etc) status of the work of the people
    Col C - reported date


    If the status in Col B is "Pending", then VBA should check if the reported date of the concerned id greater than 12th of the current month...
    and highlight as red. (date is always unique but the data will change on every month..)

    if i would want to compare between current date, i would have used conditional formatting or simple codes i get online...

    But, using unique date on current month is seems very difficult for me can any one help me in this please....


    Thanks in advance.....
    Attached Files Attached Files
    Bala

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,352

    Re: compare dates in column with unique date on current month

    Hi Bala,

    I hate to write VBA code when I don't think it is really needed. See the Conditional Formatting solution in the attached. Isn't this what you really want?

    =AND($C2="Pending",$B2>=DATE(YEAR(TODAY()),MONTH(TODAY()),12),MONTH($B2)=MONTH(TODAY()))
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Contributor
    Join Date
    10-08-2013
    Location
    Chennai, INDIA
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: compare dates in column with unique date on current month

    Hello Marvin,

    Thanks a lot... this was exactly i expected.... doing tricks in excel is an ectasy...

    VBA is surely not required for the above....but,
    Is it ok for you to provide me any VBA codes to deal this kind of scenario... as this would help me in future...

    Thanks in advance...

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,352

    Re: compare dates in column with unique date on current month

    OK Bala, because you gave me some rep, here is some VBA to do what I think you want. Before running this you should delete all your Conditional Formatting formulas for this column.
    Please Login or Register  to view this content.
    Last edited by MarvinP; 04-21-2015 at 01:45 PM.

  5. #5
    Forum Contributor
    Join Date
    10-08-2013
    Location
    Chennai, INDIA
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: compare dates in column with unique date on current month

    Thanks a lot Marvin...

+ 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] Need a way to automaticaly fill in Friday dates from prior month from current date entry
    By uniqbboy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-15-2014, 11:11 AM
  2. [SOLVED] Checking to see if a date is within current month from a column of date values using vba
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-20-2013, 06:51 PM
  3. Replies: 8
    Last Post: 11-11-2012, 07:22 PM
  4. lock all cells before current date (Dates are in Column)
    By Sanoj in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-07-2012, 12:36 PM
  5. Replies: 3
    Last Post: 03-07-2012, 11:04 AM

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