+ Reply to Thread
Results 1 to 4 of 4

VBA Macro to impact all worksheets not just sheet1

  1. #1
    Registered User
    Join Date
    02-01-2016
    Location
    Melbourne, Australia
    MS-Off Ver
    2010
    Posts
    6

    VBA Macro to impact all worksheets not just sheet1

    Hello,

    Was working on a problem and found a great little bit of code posted in a different thread (thanks Dave Peterson - http://www.excelforum.com/l/561722-asdf.html).
    You can see Dave's code at the bottom my post. It concatenates 2 cells and applies different formatting to the result.

    My issues now is that it specifically refers to "Sheet1".
    My workbook has 22 worksheets, and I'm wondering if there's a way to run it across multiple sheets (ideally all sheets with a particular prefix) or alternatively on every sheet in the workbook.

    Please Login or Register  to view this content.
    Thanks for any help... Paul
    Last edited by PastaPaul; 10-25-2016 at 11:43 PM.

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

    Re: VBA Macro to impact all worksheets not just sheet1

    Hi Paul,

    Try this:
    Please Login or Register  to view this content.
    Then PLEASE edit your original post and select your code and click the "#" icon to put Code markers around it so it looks like mine.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    02-01-2016
    Location
    Melbourne, Australia
    MS-Off Ver
    2010
    Posts
    6

    Re: VBA Macro to impact all worksheets not just sheet1

    Marvin, this is great. Thanks so much.

    There's one page on the sheet that is basically a large lookup table.
    Is there any easy way to get the macro to ignore that page (called "AllCodes"). If needs be I can insert dummy columns so the data on the lookup table remains intact when the macro runs (or reference it as a separate file), but if it's easy to ignore that sheet that would be great.

    Thanks again,
    Paul

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

    Re: VBA Macro to impact all worksheets not just sheet1

    Here ya go...

    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. [SOLVED] Run Code on All Worksheets Except Sheet1 and Sheet2
    By Tellm in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-07-2016, 01:15 PM
  2. [SOLVED] A macro which pulls the data from sheet2 to sheet1 basis of scenarios selected in sheet1
    By Manish_Gupta in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-15-2015, 01:46 PM
  3. Copying data from 78 other Worksheets into Sheet1
    By robertsb in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-06-2014, 11:17 AM
  4. =+Sheet1!A1+Sheet1!B1+Sheet1!C1 macro to convert all linked ref to Values
    By chriszoma in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-20-2013, 02:44 PM
  5. Run the following macro on all worksheets but sheet1
    By dms2228 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-30-2013, 01:32 PM
  6. merge book1,sheet1,book2,sheet1,book3,sheet1 ect
    By cfinch100 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-11-2013, 01:30 PM
  7. [SOLVED] Using Macro, want to group all Worksheets, but Sheet1,How?
    By Dandelo in forum Excel General
    Replies: 3
    Last Post: 07-20-2006, 11:30 AM

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