Results 1 to 4 of 4

Multiplied macro starts based number of selected rows

Threaded View

  1. #1
    Registered User
    Join Date
    07-10-2015
    Location
    CZECH
    MS-Off Ver
    Office 365
    Posts
    53

    Multiplied macro starts based number of selected rows

    Hello experts,

    I have challenge for you. thank you for help in advance.

    Based on number of selected rows I would like to do specific multiplying of same macro step by step, connected to start row and end row.


    For example:
    I have selected "D2:D3" - then after clicking to macro button I would like to do:

    due to the D2 marking:
    Activate D2 row:
    Sheets("List1").Range("K" & ActiveCell.Row) = Date
    Macro 1
    Macro 2
    wait for ending of Macro 2, then can start next action:

    due to the D3 marking:
    Activate D3 row
    Sheets("List1").Range("K" & ActiveCell.Row) = Date
    Macro 1
    Macro 2

    End..

    of course there can be marked one row, or 50 rows...

    Thank you very much for help.

    Actual code, Macro 1 and Macro 2 Msgbox as example:

    Sub TEST()
    Application.ScreenUpdating = False
        
        Sheets("List1").Range("K" & ActiveCell.Row) = Date
        Macro1
        Macro2
    End Sub
    
    Sub Macro1()
    MsgBox "hello 1"
    End Sub
    
    Sub Macro2()
    MsgBox "hello 2"
    End Sub
    Attached Files Attached Files
    Last edited by vendam; 02-28-2017 at 02:36 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macro to hide rows based on selected Month
    By toci in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-14-2016, 04:33 PM
  2. [SOLVED] How do I create an Excel macro loop that starts with a number from a cell
    By Goodoboy in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 02-12-2016, 12:24 PM
  3. How do I create an Excel macro loop that starts with a number from a cell
    By Goodoboy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-11-2016, 06:52 PM
  4. Macro to pull all rows of data based on an item selected in drop down
    By owensjb2 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-14-2015, 10:35 AM
  5. Replies: 5
    Last Post: 12-15-2014, 05:43 AM
  6. [SOLVED] Macro to Update a Cell Based on Number of Items Selected in Pivot Slicer
    By MBeedle in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-15-2013, 01:47 PM
  7. Replies: 1
    Last Post: 05-17-2013, 04:56 AM

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