paste formula into only filtered cell

jaik22

Board Regular
Joined
Sep 23, 2016
Messages
102
Code:
Sub Macro10()
Dim LastRowColumnA As Long: LastRowColumnA = Sheets("Sayn").Cells(Rows.Count, 1).End(xlUp).Row
     ActiveSheet.Range("G4:L4").AutoFilter Field:=5, Criteria1:="<>YES" _
    , Operator:=xlAnd
    Range("H5:H" & LastRowColumnA).SpecialCells(xlCellTypeVisible).FormulaR1C1 = "0"
end sub

Hi guys, I am trying to paste values into filtered cells. This is what I got and it does not return anything.
Do you guys have any idea?

Thanks
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Hello,

Start with code like this and if needed, extend it.

Code:
Sub Macro10()    
    With Range("G4").CurrentRegion
        .AutoFilter Field:=5, Criteria1:="<>YES"
        .Resize(, 1).Offset(, 1).SpecialCells(xlCellTypeVisible).Formula = "=100+20"
    End With
    
End Sub
 
Upvote 0

Forum statistics

Threads
1,216,113
Messages
6,128,907
Members
449,478
Latest member
Davenil

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top