Results 1 to 5 of 5

Execute Find for Today in VBA

Threaded View

  1. #1
    Registered User
    Join Date
    11-18-2013
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    31

    Execute Find for Today in VBA

    Hey Geeks,

    I am facing some difficulty.
    I have got 2 columns (well, that's all needed for this coding).

    Column B - date (daily, from 01 Jan to 31 Dec)
    Column C - actual time

    I want my macro to go to todays date, move to actual time column and input actual time (copy afterwards as value)

    so I started coding with:

            Columns("B:B").Select
        Selection.Find(What:=Today, After:=ActiveCell, LookIn:=xlFormulas _
            , LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
            MatchCase:=False, SearchFormat:=False).Activate
    Selection.ActiveCell.Offset(0,1).Select
    ActiveCell.FormulaR1c1 = "=now()-today()"
    Selection.Copy
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    I seem to be just missing, how to look for today in Find.

    Anyone can help?
    Much appreciated
    Last edited by VitoBdG; 05-20-2014 at 05:05 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Find today's date and then add 1
    By brown3218 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 06-17-2013, 01:21 AM
  2. Find today's date
    By Lynneth in forum Excel General
    Replies: 1
    Last Post: 01-05-2012, 08:25 AM
  3. Using a sheet with a list to find and execute certain macros
    By crowdx42 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-29-2006, 05:09 AM
  4. my excel formulas are too long to execute find and replace
    By jmh33 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-22-2006, 01:40 PM
  5. FileSearch.Execute does not find *.eml or *.lnk files
    By RosH in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-08-2005, 04:25 AM

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