+ Reply to Thread
Results 1 to 4 of 4

Rearrange Columns on Each Sheet in Workbook

  1. #1
    Registered User
    Join Date
    06-23-2015
    Location
    South San Francisco, California
    MS-Off Ver
    Office 2016
    Posts
    9

    Rearrange Columns on Each Sheet in Workbook

    Hi Everyone,
    I have a macro that deletes unnecessary columns and rearranges the remaining columns perfectly for the active sheet, but there are three other sheets that have the same headers, but different data. My goal is to have the macro delete and rearrange the columns on each sheet. I'm stuck and it's starting to make me go crazy. Please help!


    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    01-15-2016
    Location
    Dallas, TX
    MS-Off Ver
    2007
    Posts
    65

    Re: Rearrange Columns on Each Sheet in Workbook

    Hi there,

    I'm no expert... Your Kung Fu is stronger than mine, BUT... looks like you could use another For Loop. You are only on the active sheet when you insert your new columns, and there is no instruction to move to the next sheet.

    Perhaps before your For x loop, you need to insert a For Each ws in Sheets loop.

    Thoughts anyone?

  3. #3
    Registered User
    Join Date
    06-23-2015
    Location
    South San Francisco, California
    MS-Off Ver
    Office 2016
    Posts
    9

    Re: Rearrange Columns on Each Sheet in Workbook

    Thanks, Raymundus. I tried this, but it inserted additional columns, moving my existing columns to the right.

  4. #4
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,535

    Re: Rearrange Columns on Each Sheet in Workbook

    Looks like your rearranging of the columns is outside the For Each ws------Next ws

+ 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] Rearrange columns in new excel sheet in desired sequence
    By harman83 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 11-05-2015, 02:09 AM
  2. Rearrange columns
    By karthik013 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-03-2014, 05:51 AM
  3. Rearrange columns
    By Drigomaniac in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-16-2013, 01:02 PM
  4. Replies: 0
    Last Post: 05-20-2013, 11:17 PM
  5. Rearrange columns - loop perhaps?
    By tone640 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-20-2011, 09:18 AM
  6. Rearrange columns because of different dates.
    By Sveinpein in forum Excel General
    Replies: 1
    Last Post: 04-01-2009, 09:46 AM
  7. Rearrange columns using VBA
    By ktpack in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-07-2006, 03:57 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