+ Reply to Thread
Results 1 to 5 of 5

Simple Vba to find a date

  1. #1
    Registered User
    Join Date
    11-17-2008
    Location
    Adelaide,Australia
    Posts
    12

    Simple Vba to find a date

    I'm a total noobie at VBA

    I'm trying to get this working but am totally lost.

    It should be simple.

    I have attached sample data for you to look at as it's hard to explain my problem with out it.

    Basically I have two sheets - Both contain items in column1 and dates in column2 - I'm trying to write a macro that cycle through the item codes on sheet1 and match them against sheet2 and copy across the first date that is > than the date on sheet1 from sheet2 into column3 on sheet1. (If no date is found it should move on)

    Help please - You wizz should have this licked pretty quick.
    Attached Files Attached Files
    Last edited by VBA Noob; 11-19-2008 at 04:20 AM.

  2. #2
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387
    Algeraist,

    See the attached workbook for a solution using SUMPRODUCT.


    Have a great day,
    Stan
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  3. #3
    Registered User
    Join Date
    11-17-2008
    Location
    Adelaide,Australia
    Posts
    12
    Not quite - I'm not after the Max date from sheet2 but the first date greater than the date on sheet1.

    Thanks for trying - I may use this in the future.

    Regards

  4. #4
    Registered User
    Join Date
    11-17-2008
    Location
    Adelaide,Australia
    Posts
    12
    No takers on this - maybe it's too hard.

    I have posted on a few sites and one has solved

  5. #5
    Registered User
    Join Date
    11-19-2008
    Location
    England
    Posts
    6
    Something like this should work:

    Please Login or Register  to view this content.

+ 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