+ Reply to Thread
Results 1 to 3 of 3

Help Combining Columns

  1. #1
    Registered User
    Join Date
    08-24-2015
    Location
    Texas, USA
    MS-Off Ver
    365 MSO (16.0.x.x) 64-bit
    Posts
    15

    Question Help Combining Columns

    I have two columns (C and D). C is empty (used as a spacer for printing) and D contains text. I'm writing a macro so I need to do this with VBA. What I'd like to do:

    1. Get the width of C and D and add them together (stored in a variable)
    2. Change the width of D to the combined value from step 1
    3. Delete column C
    4. Right align cells in newly sized column C

    I'm having trouble with step 1 and 2. I probably could figure out step 2 if I could see the code for step 1. Can anyone help me or point me in the right direction for solving this? Everything I'm finding on Google is GUI and formula based .

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Help Combining Columns

    like this

    Please Login or Register  to view this content.
    Kind regards
    Leo

  3. #3
    Registered User
    Join Date
    08-24-2015
    Location
    Texas, USA
    MS-Off Ver
    365 MSO (16.0.x.x) 64-bit
    Posts
    15

    Re: Help Combining Columns

    Quote Originally Posted by LeoTaxi View Post
    like this

    Please Login or Register  to view this content.
    Kind regards
    Leo
    This is perfect. Thank you so much!

+ 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. Combining data in multiple columns(all columns have same length)into one column
    By nzi0001 in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 07-24-2014, 11:19 AM
  2. Combining multiple rows from 2 columns into sorted columns depending on 1st columns value
    By Dexamphetamine in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-11-2013, 10:00 AM
  3. Combining 2 columns into 1 new columns. Very urgent
    By sh4vas in forum Excel General
    Replies: 8
    Last Post: 02-11-2013, 07:59 PM
  4. Replies: 2
    Last Post: 01-19-2011, 06:16 PM
  5. combining columns
    By lah4266 in forum Excel General
    Replies: 4
    Last Post: 09-11-2007, 10:43 PM
  6. Combining Text from 2 Columns into 1 then Deleting the 2 Columns
    By sleepindogg in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-30-2006, 02:30 PM
  7. [SOLVED] combining columns
    By Scot B in forum Excel General
    Replies: 2
    Last Post: 02-25-2005, 06:06 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