+ Reply to Thread
Results 1 to 2 of 2

Looking up dates in a column with a formula

  1. #1
    Registered User
    Join Date
    07-26-2014
    Location
    Laurel, Mississippi
    MS-Off Ver
    Excell 2010
    Posts
    2

    Looking up dates in a column with a formula

    I'm very new to Excel and VBA. With that said, I'm trying to do an IF THEN statement where:

    Please Login or Register  to view this content.
    And the rest of the code will copy a different cell (without the date) on the active sheet onto another sheet.

    I've been able to get this to do exactly what I want it to do when searching up a numerical value that resulted from a formula:
    Please Login or Register  to view this content.
    but it's not working for the dates.

    Also, (and I don't know if this makes a difference) IF THEN with the dates is the second IF THEN in my FOR NEXT.

    I don't know if VBA is comparing the formula with the ExpDate or if it's reading the acutal date and comparing it to ExpDate.

    Can someone please help a VBA rookie find out where I'm going wrong?

    Any help would be GREATLY appreciated!!!
    Last edited by JBeaucaire; 09-20-2014 at 02:25 PM. Reason: Added missing CODE tags. Please read and follow the Forum Rules, link above in the menu bar. Thanks.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Looking up dates in a column with a formula

    It's hard to say for SURE without seeing the data, but I'd guess there's something inexact between the date strings in your worksheet. So, try explicitly converting the values being evaluated into a CDate.

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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. Replies: 2
    Last Post: 01-08-2014, 03:50 PM
  2. [SOLVED] have a column of random dates. want a formula for an output column of them sorted
    By James C in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-03-2013, 04:24 PM
  3. Replies: 5
    Last Post: 09-24-2012, 05:14 PM
  4. Formula help for counting,with a column of dates and a column of n
    By Altstatten in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-08-2005, 05:35 PM
  5. Replies: 0
    Last Post: 02-04-2005, 03:58 PM

Tags for this Thread

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