+ Reply to Thread
Results 1 to 2 of 2

Change Cell Strings in Column to Replace Specifically the Second Character

  1. #1
    Registered User
    Join Date
    06-19-2013
    Location
    U.S.
    MS-Off Ver
    Excel 2003
    Posts
    1

    Change Cell Strings in Column to Replace Specifically the Second Character

    Hello! I am somewhat experienced with excel macros and basic computer programming. In column A I have data that is labelled "A2 - NS", "A2 - 19", "A2 - 21", "B2 - NS", "B2 - 19", "B2 - 21", "C2 - NS"... Continuing down the column to "H2 - 21". I now want to copy all these rows and paste them below these rows, but with the new values being "A3 - NS," A3 - 19..... (note that I only want the 2 to become a 3 without changing the rest of the string... for EACH row)

    I cannot for the life of me figure out how to write a macro that can help me, but I imagine it is quite simple. Understanding how to write this macro will help me quickly make sheets for future data sets

    Thanks,
    Steve

  2. #2
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: Change Cell Strings in Column to Replace Specifically the Second Character

    try this macro and see column A

    see comments under value for r at the beginning of the macro r can have any value which is mulltipled by 24 that is 24*5=120 or 24*6=144 or 24*7=168 etc

    this may be pedestrian macro but it works. experts may give more concise macro.

    Please Login or Register  to view this content.

    Please Login or Register  to view this content.
    I am not an expert. better solutions may be available
    [email protected]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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