Results 1 to 10 of 10

Replace vlookups with values after a certain date.

Threaded View

  1. #1
    Registered User
    Join Date
    10-14-2013
    Location
    uk
    MS-Off Ver
    2016
    Posts
    87

    Replace vlookups with values after a certain date.

    Hi Folks
    I need an auto run macro that will replace a range of vlookup formulas with their cell values, however the range should be from yesterday's date.
    The first column provides the date.
    So when I open first time in the morning the macro will run and replace all yesterdays vlookups with their values.

    I have the macro below.

    Sub Formulatodata()
    'updatedbyJim
    Dim Rng As Range
    Dim WorkRng As Range
    On Error Resume Next
    xTitleId = "replace formulas with values"
    Set WorkRng = Application.Selection
    Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
    Application.ScreenUpdating = False
    For Each Rng In WorkRng
    Rng.Value = Rng.Text
    Next
    Application.ScreenUpdating = True
    End Sub

    This allows me to manually select the range, however I need help with the date part .
    sample attached
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Vlookups that return multiple values
    By capitalsfan in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-18-2013, 12:11 PM
  2. Vlookups with multiple values for same ID
    By Daniel1986 in forum Excel General
    Replies: 9
    Last Post: 06-22-2012, 03:36 PM
  3. Using VLOOKUPS to return mulitple values
    By mscomputertutor in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-14-2010, 10:05 AM
  4. Replace Fixed Reference in 0000's of VLOOKUPs
    By 2709236 in forum Excel General
    Replies: 2
    Last Post: 11-23-2009, 04:03 PM
  5. Vlookups to return format as well as values
    By kosciosco in forum Excel General
    Replies: 1
    Last Post: 11-21-2007, 09:49 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