We have a macro that adds a row, so I am starting with it and I need to tweak it. Here's what I have so far (I figured with a lot of views I should keep you updated as to what I'm doing). What I'm looking at now is how to cycle thru all the rows as the amount of rows will change. I also need to paste the new number in column D. I have not tested this yet as it is in a larger macro.
Range("D8").Select
If ActiveCell.Value = "90601" Then
ActiveCell.Offset(1, 0).Select
Selection.EntireRow.Insert
ActiveCell.Offset(-1, 0).Select
Selection.EntireRow.Copy
ActiveCell.Offset(1, 0).Select
ActiveCell.PasteSpecial
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveSheet.Paste
Application.CutCopyMode = False
Else
Quote:
Originally Posted by ksquirt
I need a line in a macro to search column D, find value '90601' and copy the row that has that value in column to a new row and change '90601' to another value. There will be multiple rows with this value, but the other columns will contain other information. Can anybody help with this? I have attached the spreadsheet I am working with. Thanks!!
|