Hello
Attached file is the sample file actual data have more than 10K+ rows .... I am trying to write a vba code for below steps for Sheet 1 ... Please note Expected Result is the outcome of this macro
1: Filter the " B Column" without #N/A value
2: Replace the Value of C columns with B Columns' filtered values
3: Copy and paste as value the entire C Column
Here is my Recorded code which need to be rewrite
Code
Sub Macro1()
'
' Macro1 Macro
'
'
Range("A1:C1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.AutoFilter
Range("A1").Select
ActiveSheet.Range("$A$1:$C$61").AutoFilter Field:=2, Criteria1:="<0", _
Operator:=xlAnd
Range("C2").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=RC[-1]"
Range("C2").Select
Selection.Copy
Range("C3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.SpecialCells(xlCellTypeVisible).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("C2").Select
ActiveSheet.ShowAllData
Columns("C:C").Select
Range("C2").Activate
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("C1").Select
End Sub
Display More