Here is the deal, in the first group of code (works fine) I copied over a column with a simple if statment. The amount in this column is ever changing. Now I am trying to copy this data and then paste it below with the opposite "40" or "50" for in the new if statement and code (In Red below) this is where i am getting hung up. Would anyone have another suggestion I could use on this? highlighted error comes across on the second to last line, highlighted in blue below.
Any suggestions would be greatly appreciated
Code:
FinalRow = Cells(Rows.Count, "G").End(xlUp).Row
Range("I2:I" & FinalRow).Formula = "=if(J2>0,40,50)"
Range("I2").Copy Destination:=Range("I" & FinalRow)
Range("I2").Select
Range(ActiveCell, ActiveCell.End(xlDown)).Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
Range("I2").Select
Cells(ActiveCell, ActiveCell.End(xlDown)).Select
Cells(FinalRow + 1, 9).Select
Cells(FinalRow + 1, 9).Formula = "=(if(I2=40,50,40)"
Selection(1, 9).Copy Destination:=(FinalRow + 1)
Any suggestions would be greatly appreciated
Code:
FinalRow = Cells(Rows.Count, "G").End(xlUp).Row
Range("I2:I" & FinalRow).Formula = "=if(J2>0,40,50)"
Range("I2").Copy Destination:=Range("I" & FinalRow)
Range("I2").Select
Range(ActiveCell, ActiveCell.End(xlDown)).Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
Range("I2").Select
Cells(ActiveCell, ActiveCell.End(xlDown)).Select
Cells(FinalRow + 1, 9).Select
Cells(FinalRow + 1, 9).Formula = "=(if(I2=40,50,40)"
Selection(1, 9).Copy Destination:=(FinalRow + 1)