Vba Code Modification

  • Like this you mean?

    Sub AAAAA()
    Dim lc As Long, i As Long, j As Long
    lc = Cells(1, Columns.Count).End(xlToLeft).Column
    j = 1
        For i = 1 To lc
            Sheets("Sheet2").Cells(j, 1).Resize(2).Value = Cells(1, i).Resize(2).Value
            j = j + 3
        Next i
    End Sub
  • And one more thing my data is big so in sheet 2 there r 4 Pasted parts so what i want is don't paste the data in sheet2 and paste that data in sheet4 (1st part)separately in sheet5( 2nd part)separately in sheet6 (3rd part) seperately and in sheet 7 (4th part)seperately

  • Your attachment does not resemble your Post #1 at all.
    Unfortunately, as you described in your attachment is way beyond me so I'll have to bow out.
    You'll have to wait till somebody more knowledgeable jumps in.
    Good luck

  • I just want to know that what i am trying to do is possible or not bcoz u told more knowledgeble so i am worried about my question

  • Everyone is knowledgeful invba in ozgrid
    ozgrid is known for its best quality vba codes
    Only the thing disapointed me is if my question is a complex question plz let us know we will choose hire option in ozgrid bcoz i know for complex question i need to opt for hire option in ozgrid
    The only thing and a small thing is whenever i visit to this website there is a hope that i will get rply from urs
    But the thing is atleast let us know that this is the complex question kindly opt for hire option and we will help u at our best level

  • You can complain as much as you like but there is no explanation anywhere. Just a before and after but no explanation on why these rows are to be deleted.
    I'll give it one try and that's it. No good, you're out of luck from my side until you take the time and explain things properly.

    Sub AAAAA()
    Dim c As Range
        For Each c In Range("L1:L" & Cells(Rows.Count, "K").End(xlUp).Row)
            If c.Value = 1 Then
                Range(Cells(c.End(xlUp).Offset(1, -11).Row, 1), Cells(c.End(xlDown).Offset(-1).Row, 12)).ClearContents
            End If
        Next c
    End Sub
  • We don't want to delete that joli sir kindly see the attachment in this post see the sample file of excel what i want is to copy the data and paste the data
    the data which we copy are sets lots of sets
    So we want to copy that sets and paste that sets as shown in the sample file
    Now the pasting part why we r pasting the data like this
    We r pasting the data like this bcoz i am researcher I want to analyze that data and for that i have maken a sheet with formulas and that will help me to analyze the data
    I am doing Research so i don't know what will work so finding the same

  • And the delets part which u saying that is not delete that is clear content of the cells and that question is different and that post is also different and explanation is given in that post and in this post also
    2nd thing explanation for what u can see the sample file in both the post what we have to do i told u
    Now i need ur guidance for code
    And i think no explanation is required now

  • Now i understood what u have done joli
    First of all Thnx alot for giving ur precious Time and for Ur great efforts
    This code is of different post thnx for the solution joli by mistakely u have sended the code to this post I ran the code it works best and doing the same. What i wanted
    Plz look into this post joli and thnx alot joli

  • I can't see how you arrive at the result wanted.
    No proper explanation, no more answers from me. I am sorry
    I can't see the logic between Sheet1 and Sheet2. Maybe someone else can.

    BTW, you're right. The code in Post #14 was for another thread. Good catch

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!