+ Reply to Thread
Results 1 to 3 of 3

Autofill, Sorting, VBA

  1. #1
    Registered User
    Join Date
    05-18-2021
    Location
    Switzerland
    MS-Off Ver
    365
    Posts
    8

    Autofill, Sorting, VBA

    Hi everyone



    I need help accomplishing this automation task. I guess the only possible way is to use VBA, which is why I am asking for code suggestions. However if somebody knows how to implement it withou VBA feel free to share.



    (You can find the file attached)



    What I want to do:

    1. When starting the macro it should first update the table by marking the first red row 2 and dragging it down until row 20 (without overwriting row 21/the row with "Total") (Autofill without formatting)

    2. Since this autofill fills the table with other stuff which is below the last name I want to delete everything starting from the yellow "Total". So it should somehow find in column A the word "Total" and delete everythin below it (all the green values)

    3. Finally it should sort the light blue marked sub-table. In general it should select and sort only the sub-table where the first yellow row appears (it should really find the colored cell since this is not static)

    I would much appreciate help, since I need to automate this and I don't know how.

    ex.JPG

    General improving tips appreciated!

    Thank you!
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Autofill, Sorting, VBA

    Hi Lorena,

    If your data was input in a way like in the attached, you could do a Pivot Table and easily get the result you might like better. Lots of answers are based on the way the original data is entered. See the attached for my suggestion.
    Map reformat for PT.xlsx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    05-18-2021
    Location
    Switzerland
    MS-Off Ver
    365
    Posts
    8

    Re: Autofill, Sorting, VBA

    Hi,

    How do I need to implement the above mentioned steps 1-3 if my input data was in this format?

+ 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] How to include prefix for Series Autofill and automatically autofill next blank row?
    By soojungchoe in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-09-2021, 07:49 PM
  2. Autofill base on Active Cell and Autofill by row count of another sheet
    By enyak in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-19-2014, 10:06 PM
  3. Creating a autofill list with custom sorting
    By qontrol in forum Excel General
    Replies: 3
    Last Post: 05-09-2014, 02:46 AM
  4. [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
  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. Replies: 1
    Last Post: 06-17-2005, 04:05 PM
  7. Replies: 0
    Last Post: 03-02-2005, 12:06 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