VBA to fill value down

Utradeshow

Well-known Member
Joined
Apr 26, 2004
Messages
800
Office Version
  1. 365
Hi All,

Trying to come up with VBA that will fill the Value of O2 through R2 Down to the last row when value entered.

Rate Sheet.xlsx
OPQR
1UNITSHELPER REQUIREDSTORAGE REQUIREDDISPOSAL REQUIRED
21YESYESYES
31YESYESYES
41YESYESYES
51YESYESYES
61YESYESYES
71YESYESYES
81YESYESYES
91YESYESYES
101YESYESYES
111YESYESYES
121YESYESYES
131YESYESYES
141YESYESYES
151YESYESYES
161YESYESYES
171YESYESYES
181YESYESYES
191YESYESYES
201YESYESYES
211YESYESYES
221YESYESYES
231YESYESYES
241YESYESYES
251YESYESYES
261YESYESYES
271YESYESYES
281YESYESYES
291YESYESYES
301YESYESYES
311YESYESYES
321YESYESYES
331YESYESYES
341YESYESYES
351YESYESYES
361YESYESYES
371YESYESYES
381YESYESYES
391YESYESYES
401YESYESYES
411YESYESYES
421YESYESYES
431YESYESYES
441YESYESYES
451YESYESYES
461YESYESYES
471YESYESYES
481YESYESYES
491YESYESYES
501YESYESYES
511YESYESYES
ROLLOUT
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
What column can we look at to determine where the last row of data is?
Is it column N?

If so, this should do what you want:
VBA Code:
    Dim lr As Long
    
'   Find last row in column N with data
    lr = Cells(Rows.Count, "N").End(xlUp).Row
    
'   Copy values from O2:R2 to end of data
    Range("O2:R2").Copy Range("O3:O" & lr)
 
Upvote 0
Solution
You are welcome.
Glad I was able to help!
 
Upvote 0

Forum statistics

Threads
1,223,248
Messages
6,171,021
Members
452,374
Latest member
keccles

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