+ Reply to Thread
Results 1 to 4 of 4

can these 3 macros be combined into 1?

  1. #1
    Registered User
    Join Date
    12-13-2014
    Location
    Minneapolis
    MS-Off Ver
    MS Office 2010 Pro 32 bit
    Posts
    23

    can these 3 macros be combined into 1?

    the challenge seems to be referring back to the previously ActiveSheet . . . when toggling between CopyFrom range and Paste to range1, and PasteRange2 (two different copy to destinations).

    thanks in advance for any ideas ...

    Steve

    crossposted: http://www.vbaexpress.com/forum/show...s-into-1-macro

    this is similar to my previous post however I am in fall back mode and taking a different tack having no luck w/ the prevoius approach.
    Having given up on embedding these in another sub entirely - per previous post - I now have these 3 macros working and doing all I intended to do - - just curious if it is possible to combine thm into 1?

    thanks again


    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: can these 3 macros be combined into 1?

    Macros 1 & 3 both test for "No", but for 1 and 2:
    Please Login or Register  to view this content.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    12-13-2014
    Location
    Minneapolis
    MS-Off Ver
    MS Office 2010 Pro 32 bit
    Posts
    23

    Re: can these 3 macros be combined into 1?

    Hi ProtonLeah,

    Thank you very much for the suggestion. I ran it, but it omitted the 2nd part of If no, which should copy range to RR2 as well as RR1.

    I edited as follows, but ran into a compile error at this line; Selection.Insert Shift:=xlToRight - - when it moves to RR2 sheet

    error msg: "insert method of range class failed

    Sub MacroRR100()
    Application.DisplayAlerts = False
    Application.ScreenUpdating = False

    Application.Goto Reference:="RR_Table_Copy"
    Selection.Copy

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    10-05-2014
    Location
    Regina, SK Canada
    MS-Off Ver
    Excel for Mac 11
    Posts
    330

    Re: can these 3 macros be combined into 1?

    How about this? … You have the working parts, this will combine them.

    Please Login or Register  to view this content.
    One advantage; it's easier to edit/change/fix each part if needed than worrying about interactions of statements in one large module. Divide and Conquer philosophy.

    - Stu

+ 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. combined cells
    By rgrstvr in forum Excel General
    Replies: 3
    Last Post: 05-16-2014, 09:29 PM
  2. LOOKUP and IF Combined
    By adz59shadow in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-30-2013, 09:08 PM
  3. Combined IF with OR
    By oteixeira in forum Excel General
    Replies: 2
    Last Post: 01-20-2011, 08:11 AM
  4. Combined and summary
    By magic_ma in forum Excel General
    Replies: 12
    Last Post: 01-04-2010, 06:15 AM
  5. IF & Sum if combined
    By bwhizz in forum Excel General
    Replies: 3
    Last Post: 01-07-2009, 05:43 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