+ Reply to Thread
Results 1 to 3 of 3

Add date on CountA

  1. #1
    Forum Contributor
    Join Date
    08-10-2014
    Location
    Alberta
    MS-Off Ver
    2016
    Posts
    128

    Add date on CountA

    I keep getting an error of Error 1004 Application defined or object-defined error on the last part of code: ws2.Cells(emptyRow, emptyCol).Value = DateAdd("d", -1, Date)

    How do I change it. I think it needs to be on emptyCol =, but I am not sure

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Add date on CountA

    I think this line is what is causing you the issues:

    Please Login or Register  to view this content.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    08-10-2014
    Location
    Alberta
    MS-Off Ver
    2016
    Posts
    128

    Re: Add date on CountA

    I'm sorry, I have left out needed information. The range is in another worksheet Sheet1 from where the dates and stuff are added (Sheet8).

    Please Login or Register  to view this content.
    The error goes away when the last line is taken out, but it does not add the date in another column when entered for a second time. If kept in, it still adds but the error comes up and the next part of code is not completed, which is an issue.
    Last edited by Templemind; 10-14-2014 at 10:43 AM.

+ 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. Counta
    By cdrcld in forum Excel General
    Replies: 5
    Last Post: 02-28-2011, 08:44 PM
  2. Using CountA
    By DesmondLeo in forum Excel General
    Replies: 1
    Last Post: 07-10-2009, 01:11 AM
  3. Setting Counta range based on a date
    By Weasel in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-02-2009, 04:37 PM
  4. [SOLVED] using COUNTA
    By DougMc in forum Excel General
    Replies: 4
    Last Post: 05-29-2005, 08:05 PM
  5. [SOLVED] counta
    By DanC in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-05-2005, 12:06 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