+ Reply to Thread
Results 1 to 12 of 12

VBA to automatize severals actions

  1. #1
    Registered User
    Join Date
    04-08-2016
    Location
    France, Paris
    MS-Off Ver
    Excel 2007
    Posts
    13

    VBA to automatize severals actions

    Hi there !

    I'm currently working on one VBA macro to automatize some actions :


    - 1) apply a filter on row 1
    - 2) delete dolumn A
    - 3) Delete the line with a number 1 in the row A
    - 4) Delete the lines with mentions like : cancel, cancelled in the row A
    - 5) Count the total of lines and feed another sheet with this number

    Thanks for the help !

    Best regards,

    Pan

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: VBA to automatize severals actions

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window (or use the paperclip icon).
    Cheers!
    Deep Dave

  3. #3
    Registered User
    Join Date
    04-08-2016
    Location
    France, Paris
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: VBA to automatize severals actions

    Hey,

    thanks for the advice !

    Here is the file, with the before after sheet ! Also, in the sheet1 i need the J26 filled with the sums of rows after all the operations.

    Thanks for helping !
    Attached Files Attached Files

  4. #4
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: VBA to automatize severals actions

    Try this

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-08-2016
    Location
    France, Paris
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: VBA to automatize severals actions

    hey.

    So, atm the macro isn't working for me, i'll need more help on this i assume.

    The macro is in the main sheet but need to work o a different sheet every week or so. Also, there's no mention of the sheet where the macro is working, do you have any idea about that ?

  6. #6
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: VBA to automatize severals actions

    Hi,

    It does work for me.. What error do you get?

    Besides, I purposely have not mentioned sheet names. This makes it a generic code that runs on any sheet you want.

    See the file attached, I have integrated the Macro..

    Let me know if it still does not work for you.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    04-08-2016
    Location
    France, Paris
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: VBA to automatize severals actions

    Allright !

    It works now, i'm not sure where I was wrong tho... ! I'll analyze it and thanks for the help !

    Thanks to you kind stranger !

  8. #8
    Registered User
    Join Date
    04-08-2016
    Location
    France, Paris
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: VBA to automatize severals actions

    Ok a little more for me and i'll be fine with this :

    Can you add on this macro a fill area where i can type a sheet's name to run the macro on a special sheet ?

  9. #9
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: VBA to automatize severals actions

    What does a "special sheet " mean?

    If you can explain a bit more, I can help you out..

  10. #10
    Registered User
    Join Date
    04-08-2016
    Location
    France, Paris
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: VBA to automatize severals actions

    Hey !

    Well, i'll run this macro on many sheets, but i need to run it like one time.

    At the moment, if i run the macro 3/4 times, it removes everything in the sheet. Is this normal ?

    To get the macro work only on one sheet of the WB, i would like to implement a way to select one sheet amongst all by either typing his name or any other solution you have in mind.

    Thanks a lot !

  11. #11
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: VBA to automatize severals actions

    SO basically you want the Macro to run only on the sheets that you select of all available sheets? Is that what you want?

  12. #12
    Registered User
    Join Date
    04-08-2016
    Location
    France, Paris
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: VBA to automatize severals actions

    Yes exactly !

    Also, if the Run macro is placed in let's say sheet 1, how can i run the macro into sheet 2 ?

+ 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] If Not Is Nothing multiple actions
    By Aaron092 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-06-2014, 06:33 AM
  2. Automatize calculation of max according several criterias
    By gaudi93080 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-12-2014, 07:52 AM
  3. How to automatize a changing range
    By a_driga in forum Excel General
    Replies: 3
    Last Post: 08-27-2011, 11:53 AM
  4. Automatize a sheet using formulas
    By shippingkongen in forum Excel General
    Replies: 1
    Last Post: 05-10-2010, 06:46 AM
  5. automatize same formulas in different rows
    By ppan13 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-02-2008, 01:37 PM
  6. How to automatize Salary slip preparation using EXCEL and a WORD-template?
    By ravikiran in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-05-2008, 08:39 AM
  7. Actions between user actions
    By Indiana Epilepsy and Child Neurology in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-16-2006, 12:45 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