+ Reply to Thread
Results 1 to 6 of 6

Autofill VBA macro

  1. #1
    Registered User
    Join Date
    04-02-2020
    Location
    Bratislava
    MS-Off Ver
    2016
    Posts
    80

    Autofill VBA macro

    Hello guys,
    Since I am a new bee in this VBA world I just wanted to ask you for some help! The thing is:
    I created a macro that is registering all the new data I have been writing in other Sheet, but I would need to autofill some cells automaticlly if possible.
    Find attached the image:

    1.PNG

    Excel is registering through a macro the data in columns (A:F) and I would need to autofill the columns (G:S) that contain formulas

    Thanks!!!!!!!!

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,859

    Re: Autofill VBA macro

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    04-02-2020
    Location
    Bratislava
    MS-Off Ver
    2016
    Posts
    80

    Re: Autofill VBA macro

    Hi,
    I just attached an example. I just wanted to autofill the last row (yellow cells) automaticlly by the time the new data appears in the columns A:F,
    but I do not know how to write the macro to recognise the last data row. I have tried with the macro recorder:

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by alansidman; 04-02-2020 at 06:26 PM.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,859

    Re: Autofill VBA macro

    Code Tags Added
    Your post does not comply with Rule 2 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 at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,859

    Re: Autofill VBA macro

    Place this code in the Worksheet Event
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    04-02-2020
    Location
    Bratislava
    MS-Off Ver
    2016
    Posts
    80

    Re: Autofill VBA macro

    Thanks Alan for your help, the code works perfectly Apologies I'll comply with the rules in future posts.

+ 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] Autofill Macro Help
    By nobodyukno in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-16-2013, 01:00 PM
  2. Autofill Macro, Please help!!!
    By bburrus in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-03-2013, 06:32 AM
  3. [SOLVED] Very small AutoFill macro showing "AutoFill methode of range class failed" why ?
    By nur2544 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-28-2013, 10:21 PM
  4. Replies: 0
    Last Post: 09-17-2012, 08:24 AM
  5. Macro for Autofill removes header info when there is no data to autofill
    By esturan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-06-2012, 01:42 PM
  6. AutoFill Macro
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-27-2010, 05:22 AM
  7. Autofill in Macro
    By kmakay in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-30-2008, 10:24 AM
  8. AutoFill Using a macro
    By Richard in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-21-2006, 01:15 PM

Tags for this Thread

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