+ Reply to Thread
Results 1 to 5 of 5

AutoFill to match nearest column

  1. #1
    Registered User
    Join Date
    02-01-2015
    Location
    rochdale, england
    MS-Off Ver
    2007
    Posts
    2

    AutoFill to match nearest column

    Hi
    Its my first question posting here, so I hope I am posting in the right place.

    I am attempting to create a button to AutoFill 2 columns (D and E) with data from the first row, based on the number of rows in column (A). I can do this by double clicking the right bottom corner when the cells are selected.

    I have created a button to do it, however, it will only do it for the number of rows that are currently present, I want it to be able to do it for however many rows there are in Column A, as Column A will always be changing.

    Any help is much appreciated. I will also post the code here for the button:

    Please Login or Register  to view this content.
    Last edited by athar1; 02-01-2015 at 04:42 PM. Reason: didnt adhere to the rule about code

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,420

    Re: AutoFill to match nearest column

    Welcome to the forum.

    Please Login or Register  to view this content.

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,420

    Re: AutoFill to match nearest column

    Thanks for the rep.

    Please note, you should STILL edit your original post to add Code Tags.


    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

  4. #4
    Registered User
    Join Date
    02-01-2015
    Location
    rochdale, england
    MS-Off Ver
    2007
    Posts
    2

    Re: AutoFill to match nearest column

    Thank you very much for that, it worked!

    I am sorry for not adhering to the rule about code, it will not happen again.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,420

    Re: AutoFill to match nearest column

    I am sorry for not adhering to the rule about code
    No worries, thanks for editing the post.

+ 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. [SOLVED] Index-Match: Increasing the column count through a vertical autofill
    By Dr_Orpheus in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-29-2014, 10:19 AM
  2. [SOLVED] AutoFill Function to Match Range created by Column & Row
    By Trevasaurus in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-09-2013, 11:38 AM
  3. lookup or match - Return nearest match
    By devouk in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-05-2012, 06:11 AM
  4. autofill to match column
    By rmp478 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-20-2012, 05:41 PM
  5. Lookup nearest Value in one Column and Match the next Collumn
    By tomlancaster in forum Excel General
    Replies: 4
    Last Post: 10-27-2009, 07:38 AM

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