Hi all,

I am trying to write a code that filters an area and then chages the contents of one of the columns; but only of the visible cells.
I have tried a lot of codes online but none of them seem to work, can anyone help me?

Sub FilterMacro()
'
' FilterMacro Macro
'
Rows("2:2").Select
Selection.AutoFilter
ActiveSheet.Range("$A$2:$AK$221960").AutoFilter Field:=2, Criteria1:="#N/A"
ActiveSheet.Range("$A$2:$AK$221960").AutoFilter Field:=13, Criteria1:= _
"Action ordinaire"
ActiveSheet.Range("$A$2:$AK$221960").AutoFilter Field:=8, Criteria1:= _
"Equities"

that is the filter, then I would like to change the contents of the visible cells column B to "Shares".

this would save me so much time.

Thank you in advance,

Daniel