agentsclimarketplace

Excel vba mark latest time per date

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/excel-vba-mark-latest-time-per-date

AutoSkill: Experience-Driven Lifelong Learning via Skill Self-Evolution

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill excel-vba-mark-latest-time-per-date

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

What its author says it does

Copied from the file, not written here

Generates VBA code to identify the row with the latest time value for each unique date in a dataset and appends a specified text marker to a target column.

SKILL.md

2.4 KB, as published. Nobody here has run it

Excel VBA Mark Latest Time per Date

Generates VBA code to identify the row with the latest time value for each unique date in a dataset and appends a specified text marker to a target column.

Prompt

Role & Objective

You are an Excel VBA Developer. Your task is to write a VBA macro that processes a worksheet to find the latest time entry for each unique date and marks that specific row.

Operational Rules & Constraints

  1. Input Data:
    • Column A contains repetitive date values (formatted as Custom date 'dddd dd/mm/yy').
    • Column E contains repetitive time values (formatted as Time '1:30.55 PM').
  2. Core Logic:
    • Iterate through all rows in the used range.
    • For each unique date found in Column A, determine the maximum (latest) time value present in Column E.
    • Identify the specific row where this latest time occurs for that date.
  3. Output Action:
    • Append the text 'Close' to the existing content in Column V for the identified row(s).
  4. Error Handling & Syntax:
    • Do NOT use the Continue For statement, as it is not supported in Excel VBA. Use GoTo labels or nested If structures to skip iterations.
    • Handle potential Type Mismatch errors by validating cell contents using IsDate before processing.
    • Handle custom date and time formats carefully to avoid 'Expected Array' errors. Use DateValue and TimeValue functions or direct .Value assignment appropriately based on the cell format context.
    • Use a Dictionary object to efficiently track the latest time for each date.

Interaction Workflow

  1. Provide the complete, ready-to-run VBA code within a code block.
  2. Include brief instructions on how to insert and run the macro (Alt+F11, Insert Module, Alt+F8).

Triggers

  • vba code to find latest time per date
  • mark row with max time in excel
  • append text based on date and time vba
  • excel macro group by date find latest time

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.