+ Reply to Thread
Results 1 to 2 of 2

Counter help

  1. #1
    Registered User
    Join Date
    05-25-2023
    Location
    Portugal
    MS-Off Ver
    Microsoft Office Professional Plus 2016
    Posts
    6

    Question Counter help

    Hello everyone
    I recently made the code below which reads the values inside certain columns and verifies if they are all on the same row and increments if the combination is the same as the one defined
    But now i want to add another feature to it and im not sure how to go about doing it which is why i need help
    Basically there is another column in my second sheet(same sheet that receives all the other values) that receives dates in the format "dd/mm/yyyy" and i would like it so that depending on the week number associated with said date the counter would be placed in a different row in sheet15.

    for example lets say that there are only these 5 rows filed in the columns i defined and these are the values present in that sheet :

    Capture.PNG

    i would want there to be 2 counters,1 for the row with : 1, 2, 3, 3/2/0, 28/09/2023 and 1, 2, 3, 3/1/0, 29/09/2023 and another counter for 1, 2, 3, 3/1/0, 05/06/2023
    the first counter would have the number 2 being displayed because 2 rows have the correct combination and they share the same weeknumber associated with their dates and the other counter would have 1 because there's only one row present with the correct combination of values that has the same weeknumber
    i also would want the counters to be displayed in the same row number as their weeknumber so the first counter i mentioned would be displayed in row 39 and the other one would be displayed in row 23
    Im sorry if what im asking here is confusing,if you have any question ask away and ill try my best to answer
    Thank you for reading

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: Counter help

    Hi, the macro code you use is clearly copied and taken from a site you found, no problem there but without actually seeing the dat not much to tell.
    If you have a date then you could also add an extra column thet stores the week number, this is a default function in Excel and base it on that column, keep in mind dat if there dates are from different years the week number can be the same, then you will also need to use the year value.
    When it comes to multiple dates I always use a column with a concatenated year and weeknumber e.g.: 202301 for 2023 week number 1 (always store a two-digit weeknumber)
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

+ 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] Changing HH:MM:SS counter format into MMM - 3 digit minute counter (eg. 120 minutes)
    By macropulos in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-08-2017, 12:09 PM
  2. [SOLVED] VBA to counter Zip plus 4
    By Scalpel4 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-25-2016, 09:40 PM
  3. I need a counter
    By superchew in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-23-2014, 02:04 PM
  4. counter
    By max_max in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-12-2014, 04:42 PM
  5. Help with i counter
    By chiidzzz in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-02-2013, 07:32 AM
  6. Row counter
    By UsmanBPD in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-12-2012, 08:19 AM
  7. Can you put a counter to 001 rather that 1?
    By v2jtb in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-04-2010, 03:13 PM

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