+ Reply to Thread
Results 1 to 6 of 6

Finding Start date and End date for value using vba

  1. #1
    Registered User
    Join Date
    07-11-2018
    Location
    INDIA
    MS-Off Ver
    16
    Posts
    40

    Finding Start date and End date for value using vba

    I have an Excel sheet looks like below. I want the start date and end date for a task

    Data

    HTML Code: 



    Summarized to

    HTML Code: 

    Can you please help me
    Attached Files Attached Files
    Last edited by AV114; 09-20-2018 at 02:58 AM. Reason: attaching the file

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    1,911

    Re: Finding Start date and End date for value using vba

    Are you sure you want to use VBA? You can achieve these values with formulas:

    B18 and C18 (Enter with Ctrl+Shift+Enter):
    Please Login or Register  to view this content.
    D18:
    Please Login or Register  to view this content.
    WBD
    Office 365 on Windows 11, looking for rep!

  3. #3
    Valued Forum Contributor
    Join Date
    12-22-2015
    Location
    HK
    MS-Off Ver
    2010
    Posts
    532

    Re: Finding Start date and End date for value using vba

    Try this:
    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,840

    Re: Finding Start date and End date for value using vba

    @ikboy
    Great code. To adjust the output for dates it is better to use CLng
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  5. #5
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,613

    Re: Finding Start date and End date for value using vba

    You can do it with a Pivot Table

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  6. #6
    Valued Forum Contributor
    Join Date
    12-22-2015
    Location
    HK
    MS-Off Ver
    2010
    Posts
    532

    Re: Finding Start date and End date for value using vba

    YasserKhalil ,
    You right, Clng is better.
    Thx
    ikboy

+ 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] subset of range defined by start date and date date in dedicated cells
    By Pragmaticite in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-23-2015, 05:30 PM
  2. Replies: 2
    Last Post: 08-09-2014, 12:40 PM
  3. Counting if data falls on date between Start Date, End Date or Possible End Date
    By JessHasQuestions in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 07-26-2014, 08:01 AM
  4. [SOLVED] Finding start date and end date
    By antb2000 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-04-2014, 10:50 PM
  5. Replies: 1
    Last Post: 10-02-2012, 02:42 PM
  6. Replies: 2
    Last Post: 01-04-2012, 09:15 AM
  7. Replies: 7
    Last Post: 11-16-2008, 05:48 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