Insert one new copy row
Closed
ravenyaad
Posts
2
Registration date
Tuesday May 27, 2014
Status
Member
Last seen
May 30, 2014
-
May 27, 2014 at 01:59 PM
ravenyaad Posts 2 Registration date Tuesday May 27, 2014 Status Member Last seen May 30, 2014 - May 30, 2014 at 07:55 AM
ravenyaad Posts 2 Registration date Tuesday May 27, 2014 Status Member Last seen May 30, 2014 - May 30, 2014 at 07:55 AM
Related:
- How to insert specific number of rows at fixed intervals in excel
- Number to words in excel - Guide
- Insert gif in excel - Guide
- How to insert photo in word for resume - Guide
- How to insert check mark in word - Guide
- How to insert watermark in word - Guide
2 responses
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
May 30, 2014 at 02:09 AM
May 30, 2014 at 02:09 AM
try this macro
Sub test()
Dim j As Integer, k As Integer
j = Cells(Rows.Count, "A").End(xlUp).Row
For k = j To 2 Step -1
If Cells(k, "Y") = "y" Then Cells(k, "Y").EntireRow.Insert
Next k
End Sub
ravenyaad
Posts
2
Registration date
Tuesday May 27, 2014
Status
Member
Last seen
May 30, 2014
May 30, 2014 at 07:55 AM
May 30, 2014 at 07:55 AM
Thank you very much for your attention
This code can not solve my problem,I was able to solve the first part
((i can add a new row when the condition is met))
like
"Sub AddRows()
Dim lLoop As Long
Dim rFound As Range
With Range("k:k")
Set rFound = .Cells(3, 1)
For lLoop = 1 To WorksheetFunction.CountIf(.Cells, "y")
Set rFound = .Cells.Find("y", rFound, xlValues, , , xlNext, False)
rFound(2, 1).EntireRow.Insert
Next lLoop
End With
End Sub"
The second part is very difficult for me....
i need when insert new row to copy 5cell from
The previous row which have the condition in cell y3
Excuse me if my English is not good
Because it is not my native language
Thank you again :)
This code can not solve my problem,I was able to solve the first part
((i can add a new row when the condition is met))
like
"Sub AddRows()
Dim lLoop As Long
Dim rFound As Range
With Range("k:k")
Set rFound = .Cells(3, 1)
For lLoop = 1 To WorksheetFunction.CountIf(.Cells, "y")
Set rFound = .Cells.Find("y", rFound, xlValues, , , xlNext, False)
rFound(2, 1).EntireRow.Insert
Next lLoop
End With
End Sub"
The second part is very difficult for me....
i need when insert new row to copy 5cell from
The previous row which have the condition in cell y3
Excuse me if my English is not good
Because it is not my native language
Thank you again :)