Results 1 to 3 of 3
  1. #1
    mkc80 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2012
    Posts
    56

    RC Notation and Date Comparison

    I am trying to comparing two dates using RC notation like this:

    Range("Q3").Select


    .ActiveCell.FormulaR1C1 = _
    "=OR(AND(ISBLANK(RC[-7])=FALSE,RC[-9]=""Yes""),AND(ISBLANK(RC[-7])=FALSE,RC[-1]=TRUE), AND(RC[-5] > RC[-6],RC[-9]=""No""))"


    .Selection.AutoFill Destination:=Range("Q3:Q2999"), Type:=xlFillDefault



    RC[-5] and RC[-6] contain the dates I am talking about. I need to check whether the date in RC[-5] is greater than the date in RC[-6].

    Am I using the correct notation? Because the result I am getting is not what I expected/correct.

  2. #2
    Rod is offline Expert
    Windows 7 32bit Access 2007
    Join Date
    Jun 2011
    Location
    Metro Manila, Philippines
    Posts
    679
    You will have more success posting your query in an Excel forum.

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    I think you need to select R1C1 reference style in Excel setup. A formula using RC worked after I did that.

    Click Office Button > Options > Formulas > working with formulas

    Or use Offset function.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Comparison
    By raytackettsells in forum Queries
    Replies: 2
    Last Post: 08-06-2012, 05:30 PM
  2. Extract Strings from a Dot Notation Field
    By wwalkerbout in forum Programming
    Replies: 17
    Last Post: 02-27-2012, 02:15 AM
  3. Date Comparison swapping month and day in VB
    By Mary Fall in forum Access
    Replies: 5
    Last Post: 04-21-2011, 06:31 AM
  4. Short date comparison
    By andy101 in forum Programming
    Replies: 2
    Last Post: 03-17-2011, 04:36 AM
  5. Comparison
    By VICTOR HUGO in forum Access
    Replies: 8
    Last Post: 02-10-2010, 04:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums