+ Reply to Thread
Results 1 to 4 of 4

Update cell based on date criteria VBA

  1. #1
    Registered User
    Join Date
    11-12-2019
    Location
    New York
    MS-Off Ver
    2016
    Posts
    16

    Arrow Update cell based on date criteria VBA

    Hi Everyone -

    I'm working on making a sales report more easily "update-able". The spreadsheet is lengthy so I would like to incorporate VBA code that only pastes a certain formula for a specific date.

    I attached a rudimentary data set to the post. Essentially I would like the formula in cell H2 to be pasted into column B of the "Dataset" tab only for the rows where the dates in column A of the "Dataset" tab match the date in cell B2 of the "Date" tab.

    Any help would be much appreciated!
    Attached Files Attached Files

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Update cell based on date criteria VBA

    With this macro, you don't need to use the formula. In the workbook you posted, the date in B1 of the "Date" sheet is not found in column A of the "SALES DATA" sheet so no value will be returned to the "Dataset" sheet.
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    11-12-2019
    Location
    New York
    MS-Off Ver
    2016
    Posts
    16

    Re: Update cell based on date criteria VBA

    Thanks for the help , this works in this instance but is possible to do .formula = ... code because I have a formula that I use as a forecast.

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Update cell based on date criteria VBA

    Try:
    Please Login or Register  to view this content.

+ 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. Need VBA Help to Update and Highlight Cell Based on Multiple Criteria
    By rbhed77089 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-10-2018, 08:28 AM
  2. Update cell based on criteria in 2 columns
    By rz6657 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-20-2018, 02:24 PM
  3. [SOLVED] Update cell based on several criteria using VBA
    By rz6657 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-25-2017, 09:42 AM
  4. [SOLVED] Update cell based on several IF criteria
    By rz6657 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-24-2017, 07:41 PM
  5. [SOLVED] Need a Cell to Update Date based on a condition
    By karimel_romeo in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-08-2013, 09:23 AM
  6. [SOLVED] Update value in cell based on date and color row
    By abdulla1 in forum Excel General
    Replies: 0
    Last Post: 06-25-2012, 02:02 PM
  7. Update cell based on date range
    By deversole in forum Excel General
    Replies: 3
    Last Post: 07-06-2005, 08:58 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