selection.autofill

  1. D

    Autofill goes past Last Row, Last row identifies correct Row

    Hi I have done lots of Google searches and found nothing on this. Normally I can find an answer on Google, or force the code to do what I want by trying a different method. I have a VBA problem that is driving me nuts. I'm using End(xlUp) to find my last row. When I hover over Last row...
  2. D

    Selection.AutoFill Destination:=Range Question

    I recorded a macro to do an autofill, the first time it ran it only had 100 rows, but the rows count can change. How would I make this macro work depends on how many rows there are? Column A will always have the correct number of rows. Selection.AutoFill Destination:=Range("N4:N100")...
  3. T

    copying formulas from two columns down to the last cell in those columns

    Im trying to autofill the formula in cell A3 and B3 down to the last cell in those two columns using D as my anchor. but the code is not working. I'm getting an error message under " Selection.AutoFill Destination:=Range("A3:B3: & lrow")" lastrow = Cells(Rows.Count, "D").End(xlUp).Row...
  4. B

    Autofill Multiple Columns - VBA

    Hi newbie to VBA here, I am trying to create a macro that takes a formula created in Cell G3 drags it to M3, and then auto fills to the bottom of the last row. The way I was working on it was previously recording and making some adjustments, I cannot find a way to have it auto fill to the last...
  5. E

    How can I make Selection.AutoFill to fill the right range?

    Hello I have the code: Selection.AutoFill Destination:=Range("C2:C159800") Range("C2:C159800").Select But I want it to fill the column dynamically, corresponding to the next column's rows. E.g., if the file has 100 rows, it should autofill up to 100, etc. How can I do that? Also, do...
  6. M

    Help with a macro

    Thank you in advance with your assistance on this! I have the following partially functioning macro, however it prints off unnecessary pages beyond the data filled in column T. Is there a way to designate the "r" to finish at the same point as the "Lastrow"? Also is there a 'cleaner' way to...
  7. H

    adjusting autofill range by referring to last row/column containing data in another sheet

    Im trying to find an addition to the code blow, which adjusts the 'Selection.AutoFill Destination:=Range("A1:JS5338")' options on sheets 2 and 3 is there a way to identify the last column and last row containing data in "sheet 1" and use this range automatically as the autofill option on sheets...
  8. C

    Autofill to last cell

    I'm having trouble in changing my macro to autofill. It is a table and could be 1-5000 lines. This is what I originally recorded on my macro - Selection.AutoFill Destination:=Range("F2:F1511") Range("F2:F1511").Select I tried changing it to : Selection.AutoFill...
  9. L

    Destination:=Range -- want it to refer to the current cell

    Cell A4 has a date. I recorded a macro to go to the cell to the right, which is A4. Grab the handle and bring it down to cell A5 to give me the next date. Is there a way to change =Range("A4:A5") to reference the current cell? Selection.AutoFill Destination:=Range("A4:A5")...
  10. S

    AutoFill method of Range Class Failed

    I have formulas in ever cell from J3 thru BH3 Worksheets("Master_Week").Range("J3").Select Selection.AutoFill Destination:=Range("J3:BH2560"), Type:=xlFillDefault However the above code fails. Any ideas? Thanks
  11. D

    VBA code for autofill until empty

    Hi All, Can you please help me by adjusting this VBA for autofill until empty for the following ranges? ActiveSheet.Range("$B$1:$N$115326") Selection.AutoFill Destination:=Range("A2:A115324") Thank you very much!!! P.S. See VBA...
  12. M

    Only Use the Number of Rows from A column to Copy to B,C,D columns??

    Folks please help - Trying to create a macro using "Record Macro" but I have a static fields on my range please see below: - Those are all 350... I want the last range to be the same range as the last range from A1 column, how do I do that? thank you!!! Selection.Copy...
  13. montecarlo2012

    Loop - dynamic arrays - different worksheets

    Hello Everybody. PLEASE, I have two sheets and one dynamic array in each one, what I need is to subtract row by row one from another. On sheet 1 my array is for example purpose A1:F30, and on sheet 2 B2:G30 [in my workbook each are 6 by 2521 and growing]. this is the macro for better...
  14. H

    Adding a loop to a recorded macro

    Hello all, I recorded a macro that correlates a price series against an ascending sequence of numbers. The key steps are: 1) populate the adjacent column with ascending numbers i.e. 1,2,3,4,5... 2) Use the correl function to find the correlation between the price and the ascending numbers. A...
  15. C

    fill down macro

    I'm trying to create a fill down macro for the range D4:D5028 Here's the code I have so far: I got most of this online. Thanks. Sub FixParent() ' ' FixParent Macro ' ' Dim lastrow As Long lastrow = Range("D4:D5028").End(xlUp).Row 'ActiveCell.FormulaR1C1 ' Selection.AutoFill...
  16. V

    Randomly selecting items so that they don't repeat

    Hi All, I am creating a sheet in which I have to select 5 random items out of 20 items. However, if 5 items are selected in round 1, round 2 should have 5 values from the remaining 15 items, round 3 from the remaining 10, and at last the remaining 4. I am using following code but there is an...
  17. B

    Excel vb =sum(--(mmult((

    Sub COPYonRowsAndColumns() ' PLEASE help me to make this easier Range("BB1").Select ActiveCell.FormulaR1C1 = _ "=SUM(--(MMULT((RC11:RC12=R88C54)+(RC11:RC12=R88C55),{1;1})=2))" ' =SUM(--(MMULT(($K1:$L1=$BB$88)+($K1:$L1=$BC$88),{1;1})=2)) ' inside cell...
  18. N

    Dynamic Ranges

    I am trying to use a ctrl + shift + down arrow dynamic range but am unsure how to embed it in my current macro that has something along the lines of Selection.autofill Destination: =Range(“J2:J330”) please help
  19. G

    Issue in Concatenate Function

    Hi Friends, I need a help in a scenario. I am applying a function to concatenate a column range. However when I run the main code, it stucks in that function instead of running the main code. I have add code of concatenate function in a module and add another main code to run in another...
  20. R

    Auto fill formula from first row in a column to the last active row in the same column?

    I'm trying to right a macro that will insert a formula into cell G2 then auto fill it down to the last active row in column G. This is my closest attempt but it fails on the 'Selection.Autofill' can anyone help please? Range("G2").Select ActiveCell.FormulaR1C1 = _...

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