+ Reply to Thread
Results 1 to 8 of 8

Need macro to calculate number of days elapsed between data in two columns

Hybrid View

  1. #1
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Need macro to calculate number of days elapsed between data in two columns

    modify the code to look for "CreateDate" and use that to build the formula.

    
    Sub Macro5()
        Rows("1:1").Select
        Selection.Find(What:="createdate", After:=ActiveCell, LookIn:=xlFormulas _
            , LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
            MatchCase:=False, SearchFormat:=False).Activate
        CCol = Split(ActiveCell.Address, "$")(1)
    With Cells
        .FormatConditions.Add Type:=xlExpression, Formula1:= _
          "=$X1-$" & CCol & "1>=60"
        With .FormatConditions(.FormatConditions.Count)
            .SetFirstPriority
            With .Interior
                .PatternColorIndex = xlAutomatic
                .Color = 255
                .TintAndShade = 0
            End With
            StopIfTrue = False
        End With
    End With
    End Sub
    Last edited by mehmetcik; 10-23-2013 at 07:37 PM.

+ 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] Adding Total Number of Days Elapsed and Displaying >31 Days
    By cwwazy in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-03-2013, 08:18 AM
  2. How to calculate elapsed time between to days excluding weekends.
    By Mush001 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-23-2009, 04:19 PM
  3. How to Calculate Days elapsed where Weekend is calculated as 1 Working Day?
    By speakbones in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-14-2007, 07:20 PM
  4. Calculate elapsed working days
    By RUSH2CROCHET in forum Excel General
    Replies: 6
    Last Post: 03-09-2006, 04:40 PM
  5. formula for tracking number of elapsed days from a stard date
    By spm1371 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-22-2006, 01:00 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