Closed Thread
Results 1 to 2 of 2

Help me in editing the macro

  1. #1
    Forum Contributor
    Join Date
    01-17-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    402

    Post Help me in editing the macro

    I have the following macro with me which is letting me copy data till the next blank row.

    PHP Code: 
    Public Sub CopyRows()
        
    Sheets("Raw Data").Select
        
    ' Find the last row of data
        FinalRow = Cells(Rows.Count, 1).End(xlUp).Row
        ' 
    Loop through each row
        
    For 2 To FinalRow
            
    ' Decide if to copy based on column H
            ThisValue = Cells(x, 1).Value
            If ThisValue <> 0 Then
                Cells(x, 1).Resize(1, 33).Copy
                Sheets("English").Select
                NextRow = Cells(Rows.Count, 1).End(xlUp).Row + 1
                Cells(NextRow, 1).Select
                ActiveSheet.Paste
                Sheets("Raw Data").Select
            ElseIf ThisValue <> 0 Then
                Cells(x, 1).Resize(1, 33).Copy
                Sheets("Hindi").Select
                NextRow = Cells(Rows.Count, 1).End(xlUp).Row + 1
                Cells(NextRow, 1).Select
                ActiveSheet.Paste
                Sheets("Hindi").Select
            End If
        Next x
    End Sub 
    But i need it like if it founds a blank row in the raw data sheet it should copy the data from the next blank row to another sheet.
    I mean, it should start the validation and copy the data first to English sheet till A13. Next it found blank row. so again the data from A17 to A29 to be copied in Hindi and the next rows to be copied to English & Hindi.

    Please help

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Help me in editing the macro

    Kishore,

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Closed.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

Closed Thread

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