+ Reply to Thread
Results 1 to 3 of 3

VBA Copy Data Script - Overwrite if Date is Same, Else Next Row

  1. #1
    Registered User
    Join Date
    03-11-2012
    Location
    Sarasota, FL
    MS-Off Ver
    Excel 2007
    Posts
    7

    VBA Copy Data Script - Overwrite if Date is Same, Else Next Row

    I have a VBA script running on a sheet I use to help manage inventory that copies a set of cells from one sheet to another on exit. I need to modify it so that if the wookbook is closed more than once a day, it overwrites the days entry with the newest numbers, as opposed to having multiple entries for the same day. Here is the script I am currently using for reference.

    Please Login or Register  to view this content.
    Any thoughts? Thanks for your help.

  2. #2
    Registered User
    Join Date
    03-11-2012
    Location
    Sarasota, FL
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: VBA Copy Data Script - Overwrite if Date is Same, Else Next Row

    Took a little bit of tinkering and finally realized why my attempt was failing. My error was trying to compare DATE to NOW. I've attached the code I used for reference for others.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-24-2014
    Location
    Slovenija
    MS-Off Ver
    2019
    Posts
    12

    Re: VBA Copy Data Script - Overwrite if Date is Same, Else Next Row

    Hi. can you do inv.history as own excel file stored somewhere on c disk? :confused

+ 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] append data only if date is different, otherwise overwrite
    By roothog in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-29-2015, 05:06 PM
  2. Copy Data from One worksheet to Another without Overwrite
    By vinu1984 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-23-2013, 02:15 PM
  3. [SOLVED] vba overwrite data if 2 condition is met ( date and if helper column does not have error)
    By vlady in forum Excel Programming / VBA / Macros
    Replies: 30
    Last Post: 07-12-2013, 11:28 PM
  4. [SOLVED] Copy/Paste from a Filtered Range and Insert copied data NOT overwrite
    By Simon.Ward in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 06-12-2013, 11:14 AM
  5. Prevent data cell overwrite but allow blank cell overwrite
    By Squasher in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-09-2011, 09:24 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