+ Reply to Thread
Results 1 to 2 of 2

How to write a code's logistic in to Excel in a way that Excel reads it!!!!

  1. #1
    Registered User
    Join Date
    02-01-2012
    Location
    Puerto Rico
    MS-Off Ver
    Excel 2007
    Posts
    2

    How to write a code's logistic in to Excel in a way that Excel reads it!!!!

    Hi,

    I have an Excel table with i have to edit. The data in the table in very big and i need a code to replace some numbers.

    I have a row called Old Number. In this row the account number is stored and looks like this "115000059001000"

    I have to replace it with this format 100-2021

    Table example.JPG

    If you see the table in field A2 I have 115000059001000 and in field B2 I have 100-100.

    The logistic I write was this:

    fOR NUM=1 TO EMPTY.CELL

    for I=2 to 327


    if r(I)c1=r(I)c2 then r(I)c3=r(I)c3

    NEXT I

    NEXT NUM

    Note that this code will do the same job as the Find and replace but I don't need to do a find and replace for every cell of the table.

    Hope you understand.

    Anticipated Thanks!!

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: How to write a code's logistic in to Excel in a way that Excel reads it!!!!

    Welcome to the forum.

    Couple of pointers -
    1. Its better to upload a sample workbook than a jpg. You can get faster responses if you do so.
    2. Use code tags while typing in code. See the forum rules for more information on that.
    3. Your code is not very clear. On what basis should the format be changed? Is there some rule like number of digits, etc?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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