+ Reply to Thread
Results 1 to 3 of 3

Excel 2007 : Need help to write a macro.

  1. #1
    Registered User
    Join Date
    04-27-2012
    Location
    Melbourne, Oz
    MS-Off Ver
    Excel 2007
    Posts
    80

    Red face Need help to write a macro.

    Attached a small spread sheet called doMacro.xlsx

    there are 5 worksheets in it. I want to write a macro to change the data in worksheet 1 to look like in worksheet 5. There are 3 columns in each worksheet.

    Class is a number
    Pnumber is a 7 digit number
    Snumber is a alpha numerical string

    The following have to be done.

    Strip the alphabet from the left of Snumber if there is one
    Copy Pnumber to Snumber if it is empty for class 1 or 2 or 3
    Add "O" to the left of Snumber if class is 2 or 3
    Sort by Class
    Change class 1 to A, 2 to R, 3 to N and 4 to C

    Thanks in advance.
    Cheers
    Raghu Prabhu
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Need help to write a macro.

    Hi

    Pls check the macro:

    doMacro.xlsm

    Regards...
    Click *, if my suggestion helps you. Have a good day!!

  3. #3
    Registered User
    Join Date
    04-27-2012
    Location
    Melbourne, Oz
    MS-Off Ver
    Excel 2007
    Posts
    80

    Re: Need help to write a macro.

    SOLVED

    Thanks a lot for the effort.

+ 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