Hi,
I wrote a macro in VBA to autofilter a list of several columns on only one criterium.
This works and gives me a screen where the selected rows are visible.
After the filter is placed and executed i need to insert a fixed value in the second column of the visible rows ONLY.
How can i do this with VBA ?
H21 is the field to set the autofilter. It’s fieldnumber 8 in the spreadsheet.
Fieldnames appear as autofilter upon row 21.
Here is the code how i placed the filter:
set w = worksheets(“base”)
if param1 > “ “ then
w.range(“H21”).autofilter field:=8, criteria1:=param1
end if
How can I hereafter insert in column B from all the visible rows, insert a value like “1” ?
Thanks for any help.
I wrote a macro in VBA to autofilter a list of several columns on only one criterium.
This works and gives me a screen where the selected rows are visible.
After the filter is placed and executed i need to insert a fixed value in the second column of the visible rows ONLY.
How can i do this with VBA ?
H21 is the field to set the autofilter. It’s fieldnumber 8 in the spreadsheet.
Fieldnames appear as autofilter upon row 21.
Here is the code how i placed the filter:
set w = worksheets(“base”)
if param1 > “ “ then
w.range(“H21”).autofilter field:=8, criteria1:=param1
end if
How can I hereafter insert in column B from all the visible rows, insert a value like “1” ?
Thanks for any help.