Results 1 to 7 of 7

Finding the last row

Threaded View

  1. #1
    Forum Contributor
    Join Date
    01-14-2004
    Location
    India
    MS-Off Ver
    365
    Posts
    264

    Finding the last row

    Hello
    Good morning!
    I was trying to keep a history (in Col. D) of my data entered in a cell (A1)
    It is working ok, but started recording from 2nd Row (D2) but I need to start it from the 1st row (D1).
    Please help me to correct it. What i need is to keep the track from D1.
    Thanks
    Toms
    Private Sub Worksheet_Change(ByVal Target As Range)
    
       If Not Intersect(Target, Range("A1")) Is Nothing Then
       confirm = MsgBox("Confirm ?", vbYesNo)
       If confirm = vbYes Then
        
        '    If Range("D65536").End(xlUp).Row = 1 Then
        '    lastrow = 1
        '    Else
     lastrow = Range("D65536").End(xlUp).Row + 1
        '     End If
         Cells(lastrow, 4).Value = Range("A1").Value
          
              End If
       Else
       End If
          
    End Sub
    Last edited by SMILE; 11-23-2011 at 05:40 AM.
    Appreciate clicking the * Add Reputation button on your left side, if you want say thanks to me

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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