Try change to
![]()
Sub test() Dim e, s For Each e In Array(Array("b", Array(" *")), Array("u", Array(".*", "* "))) For Each s In e(1) Columns(e(0)).Replace s, "", 2 Next Next With Range("a2", Range("a" & Rows.Count).End(xlUp)) s = .Address For Each e In Array(Array("n", "N"), Array("v", "ICE.IFLO")) With .Columns(e(0)) .Value = .Parent.Evaluate("if((" & s & "<>"""")*(" & .Address & "=""""),""" & _ e(1) & """,if(" & .Address & "<>""""," & .Address & ",""""))") End With Next End With End Sub
Bookmarks