VBA Excel - copy word in cell down the column until the last cell in that column

tanyaleblanc

Board Regular
Joined
Mar 16, 2019
Messages
145
I'm trying to copy the word Yes down to the last cell in that column, using G as an anchor.

With Windows("Rental Rec.xlsm")
Sheets("Owned").Select
lRow = Cells(Rows.Count, "G").End(xlUp).Row
With Range("a2:bh" & lRow)
.AutoFilter
.AutoFilter Field:=3, Criteria1:="<>#N/A"
'trying to say; copy yes down the column, it didn't copy all the way down, short 8 rows and
'there must be the word yes in a3 in order for this to work


Range("AA4") = "=AA4": Range("AA3:AA" & lRow).FillDown
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
How about ...

populate (visible) filtered cells only
Code:
Range("AA3:AA" & lRow).SpecialCells(xlCellTypeVisible) = "Yes"

or to populate all cells in range
Code:
Range("AA3:AA" & lRow) = "Yes"
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,116
Messages
6,128,933
Members
449,480
Latest member
yesitisasport

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