Results 1 to 5 of 5

Thread: Code to be used for all the ranges in the column

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Regular
    Joined
    Jul 2015
    Posts
    32
    Location

    Code to be used for all the ranges in the column

    I have used the below code to generate the dates within the date range (H3:I3)

    Sub GenerateDates1()
    Dim FirstDate As Date
    Dim LastDate As Date
    Dim NextDate As Date
    
    FirstDate = Range("H3").Value
    LastDate = Range("I3").Value
    
    NextDate = FirstDate
    Range("H4").Select
    
    Do Until NextDate >= LastDate
    NextDate = DateAdd("d", NextDate, 1)
        ActiveCell.Value = NextDate
        ActiveCell.Offset(1, 0).Select
     
    Loop
    End Sub

    Can someone help me. I need to check all the date range in the column H and I.

    Very Urgent… very grateful if someone can provide me the coding.

    -Tharabai
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •