+ Reply to Thread
Results 1 to 7 of 7

Finding the number of times a date shows in a column for each date and entering values

  1. #1
    Registered User
    Join Date
    08-04-2022
    Location
    Blackburn
    MS-Off Ver
    Excel 2013
    Posts
    39

    Finding the number of times a date shows in a column for each date and entering values

    Hey all,

    Okay, so I have 2 separate sheets in a workbook and on one of these sheets I have a table with dates that show up more than once in the table but on the same column. On the next sheet I have a table with the same date range from the previous sheet but I only have these dates once in the column. What I want to do is go to the other sheet, find the number of times a date shows up in this column up to the last row and then go back to the other sheet and input this in the next column next to the specific date (dates are in order on this sheet). I have tried testing bringing back the number of times the date shows and put it in a cell but seem to just get "0". Copied the code below so you guys can see. Cheers.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,490

    Re: Finding the number of times a date shows in a column for each date and entering values

    Maybe try the American format, "08/25/2022"
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    08-04-2022
    Location
    Blackburn
    MS-Off Ver
    Excel 2013
    Posts
    39

    Re: Finding the number of times a date shows in a column for each date and entering values

    That works for some reason, can you explain why the American format works even though both sheets are in UK format? So, now I need to do the same but it needs to find the values by cell ID and do it all in one go. So one click of the button will find all the dates from sheet 2 in sheet 1 and enter the number of times it shows in sheet 2.
    Last edited by AliGW; 08-27-2022 at 12:46 PM. Reason: Please DON'T quote unnecessarily!

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,490

    Re: Finding the number of times a date shows in a column for each date and entering values

    VBA is American oriented. Personally, I wouldn't do the calculation in VBA. I'd just drop a COUNTIF formula into the relevant cells and then convert to values.

  5. #5
    Registered User
    Join Date
    08-04-2022
    Location
    Blackburn
    MS-Off Ver
    Excel 2013
    Posts
    39

    Re: Finding the number of times a date shows in a column for each date and entering values

    The workbook needs to be fully automated and mostly operates on buttons so needs to be VBA. Because of the amount of data it will contain, I need to reduce the manual input as much as possible.
    Last edited by AliGW; 08-27-2022 at 12:47 PM. Reason: Please DON'T quote unnecessarily!

  6. #6
    Registered User
    Join Date
    08-04-2022
    Location
    Blackburn
    MS-Off Ver
    Excel 2013
    Posts
    39

    Re: Finding the number of times a date shows in a column for each date and entering values

    Done! Had to convert the dates to American format. Code below.

    Please Login or Register  to view this content.

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,490

    Re: Finding the number of times a date shows in a column for each date and entering values

    And why would it not be?

    Please Login or Register  to view this content.
    No loop . Fully automated. Formulae to Values.

+ 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. Retrieving date field shows date as a number, why?
    By jeriss in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 12-03-2021, 11:48 AM
  2. [SOLVED] Sum times a given date shows on a new column, per date!
    By Aspone in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-09-2020, 02:13 AM
  3. [SOLVED] formula for counting number of times a date shows in a cell that contains other info
    By Moffa in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-27-2018, 02:38 AM
  4. Replies: 2
    Last Post: 01-22-2016, 08:38 AM
  5. [SOLVED] Date Field in the Userform shows a number and not the date - Solution?
    By JJFletcher in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-30-2014, 08:45 AM
  6. Copy column variable number of times between start date and end date
    By gbisk in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-12-2013, 07:57 AM
  7. Replies: 2
    Last Post: 03-10-2006, 04:45 PM

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