+ Reply to Thread
Results 1 to 5 of 5

Executing the following vba code in multiple sheets

  1. #1
    Registered User
    Join Date
    08-06-2013
    Location
    Germany
    MS-Off Ver
    Excel 2010
    Posts
    3

    Executing the following vba code in multiple sheets

    Hello.

    I want to excecute the following Code in multiple Worksheets.
    The macro is supposed to delete duplicate cells in column A
    So if we for instance have

    as12
    as12
    be23

    I would like to have one "as12" row deleted so that I have each entry in column A only once.

    This is the code that works if I apply it to each sheet seperately.

    Please Login or Register  to view this content.
    I need this code in a modified way so that it runs for let's say sheets 1,2,3,4,5.

    I tried a lot but somehow I cannot get it done without help.

    Would be great to get some advice.

    Regards,
    Andreas

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,715

    Re: Executing the following vba code in multiple sheets

    Hi try this

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Executing the following vba code in multiple sheets

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    08-06-2013
    Location
    Germany
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Executing the following vba code in multiple sheets

    Hello. Great Thanks a lot for your help! AB33's approch works great!

    My next issue is to count equal cells across multiple sheets. This code again works fine to count the equal entries in one sheet but I cannot transform it to work in multiple sheets.

    I want to count cells with equal entries such as "ab33" for instance. So let's say ab33 occurs in sheet 3 and in sheet 4 I want to get the macro to plot a table with

    ab33 2

    This is the code that works for a single sheet.

    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Executing the following vba code in multiple sheets

    and1andi,
    Your latest request requires a new thread as it is not related to the original thread. It is difficult to adjust the code with out seeing the sample. I have just added a loop to your code.

    Please Login or Register  to view this content.

+ 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. executing vba code in multiple sheets
    By Matija in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 08-20-2013, 01:19 PM
  2. Getting error while executing VBA Code
    By Sahil1087 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-09-2012, 02:53 AM
  3. Continue executing code
    By Henrich in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-28-2006, 08:35 AM
  4. do anybody have a sample code for executing excel macro from vb code?<eom>
    By B Deepak in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-30-2005, 05:05 AM
  5. VBA code does not start executing from Row 1
    By magoobee in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-29-2005, 03:40 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