+ Reply to Thread
Results 1 to 3 of 3

Add Rows based on string character count then Merge and format- Improve my Macro, please

  1. #1
    Forum Contributor Pierce Quality's Avatar
    Join Date
    07-29-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    221

    Add Rows based on string character count then Merge and format- Improve my Macro, please

    Hi All,
    I've written some code to add a specific number of blank rows under a range based on that range's character, then merge the original range with the added row range, then remove the center text align.
    The code works as intended, however I feel that I've written it very poorly, and I was wondering if someone could provide me with some direction to structure it better.
    Here is the code:
    Please Login or Register  to view this content.
    Any help would be greatly appreciated, thanks!

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Add Rows based on string character count then Merge and format- Improve my Macro, plea

    Just my 2cents. Use Case Statement instead of IF since you have multiple conditions. Maybe looking into Resize statement to replace offset.

  3. #3
    Forum Contributor Pierce Quality's Avatar
    Join Date
    07-29-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: Add Rows based on string character count then Merge and format- Improve my Macro, plea

    Quote Originally Posted by JieJenn View Post
    Just my 2cents. Use Case Statement instead of IF since you have multiple conditions. Maybe looking into Resize statement to replace offset.
    Thanks JiJenn, looking into the Resize statement now, will look at Case soon as well.

+ 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. VBA to extract string based on character
    By winmaxservices1 in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 01-05-2015, 06:38 AM
  2. improve delete rows macro
    By Bpd in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-01-2014, 12:05 AM
  3. [SOLVED] Split string based on character count
    By cedric_dranreb in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-19-2013, 05:14 AM
  4. Replies: 1
    Last Post: 04-19-2013, 09:47 AM

Tags for this Thread

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