Excel Macro - Set and autofill a range?
Solved/Closed
KT
-
Mar 19, 2009 at 05:56 PM
excel987 Posts 3 Registration date Tuesday June 11, 2019 Status Member Last seen June 12, 2019 - Jun 11, 2019 at 11:15 PM
excel987 Posts 3 Registration date Tuesday June 11, 2019 Status Member Last seen June 12, 2019 - Jun 11, 2019 at 11:15 PM
Related:
- Insert a new sheet at the end of the tab names and paste the range names starting in cell a1. autofit columns a:b and name the worksheet as range names.
- Insert a new sheet at the end of the tab names and paste the range names starting in cell a1. autofit columns a:b and name the worksheet as named ranges. - Best answers
- Selection.autofill destination:=range - Best answers
- Ideogram ai names - Guide
- My contacts list names - Guide
- Wow monk names - Guide
- How to change input names on lg tv ✓ - Smart TV Forum
- Laptop keyboard symbol names - Guide
8 responses
Maybe this will help:
Selection.Autofill Destination:=Range("F1:F" & Range("A" & Rows.Count).End(xlUp).Row)
Basically what it is doing is checking to see what the last cell with a value in A is and fill F1 to the F whatever the last cell with value in A. The only way this will work is if you have the same amount of data and rows in column A as you need to fill in F.
I hope that makes sense bc I know what im talking about and it doesnt make sense to me. Just try out the code I have to use this for most of my macros.
Selection.Autofill Destination:=Range("F1:F" & Range("A" & Rows.Count).End(xlUp).Row)
Basically what it is doing is checking to see what the last cell with a value in A is and fill F1 to the F whatever the last cell with value in A. The only way this will work is if you have the same amount of data and rows in column A as you need to fill in F.
I hope that makes sense bc I know what im talking about and it doesnt make sense to me. Just try out the code I have to use this for most of my macros.
Aug 13, 2010 at 06:02 AM
hornstar1964,
Thanks for your solution. it worked like a miracle for me...:-)
Feb 20, 2013 at 02:05 PM
Jan 17, 2018 at 01:41 AM
Mar 14, 2019 at 07:40 PM
Jun 11, 2019 at 11:15 PM
Is there a way to enter the ranges using a "Named Field" in the macro without having to hardcode them in the macro?