+ Reply to Thread
Results 1 to 5 of 5

Selection.AutoFill to work with dynamic range ?

  1. #1
    Registered User
    Join Date
    03-25-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    26

    Selection.AutoFill to work with dynamic range ?

    Hi,

    As i am a noob in excel, i require help. thanks in advance

    I have attached a spread sheet in which i want it to populate a formula all the way down.

    [ CODE ]'Selection.AutoFill Destination:=Range("C6:C15")'[ CODE ]

    Now the problem is that my range will never be the same, as number of people who will get the letter will change on daily basis.

    I.e if you look at example2 sheet & Example3.

    I want the macro to look at columA & check total number of cases & then determine the range. i.e

    [ CODE ]Selection.AutoFill Destination:=Range("C6:.End(xlDown).Row")[CODE ]

    Sorry in advance if i failed to explain my question. Thanks again
    Attached Files Attached Files
    Last edited by kbriaz; 07-30-2013 at 04:55 PM.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,199

    Re: Selection.AutoFill to work with dynamic range ?

    Hi, kbriaz,

    maybe like this:
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    If you use Code tags pleas omitt the spaces in between the square brackets.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    03-25-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Selection.AutoFill to work with dynamic range ?

    Wow, this was one super fast reply. thank you so much Holger.

    I understand both codes are the same, one is a more simplified version ?

    Thanks again. very very very helpfull.

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,199

    Re: Selection.AutoFill to work with dynamic range ?

    Hi, kbriaz,

    the first attempt is writing the formulas into teh cells and then use Autofill, the second is filling the whole ranges with the formulas. It depends on what you find easier.

    Ciao,
    Holger

  5. #5
    Registered User
    Join Date
    03-25-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Selection.AutoFill to work with dynamic range ?

    Quote Originally Posted by HaHoBe View Post
    Hi, kbriaz,

    the first attempt is writing the formulas into teh cells and then use Autofill, the second is filling the whole ranges with the formulas. It depends on what you find easier.

    Ciao,
    Holger
    I find it very helpful - You da man - Thanks again - ta

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA Code - Autofill with a Dynamic Range
    By Jurij in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-24-2013, 02:27 AM
  2. Edit Macro for Autofill and sorting to not to define specific cells
    By catcud in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-24-2012, 06:07 PM
  3. Autofill a Dynamic Selection
    By georgeanaprop in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-05-2012, 12:36 PM
  4. range selection for autofill
    By LuuKoO in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-06-2008, 06:07 AM
  5. Selection.Autofill Destination:=Range(ActiveCell.Value)
    By Shaka215@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-23-2006, 06:20 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1