+ Reply to Thread
Results 1 to 5 of 5

Change text within a cell

  1. #1
    Registered User
    Join Date
    10-11-2007
    Posts
    11

    Change text within a cell

    Hello All,

    I am looking for some help on changing text within a cell. For example, text "LotNumber=7100" on one spreadsheet is being copied over to another spreadsheet. However on the new spreadsheet all that is required is 7100. So I am looking for some type of way to eliminate the "LotNumber=" from the text. Here is the problem though, 7100 changes, it incriments upwards with each new spreadsheet. So I would need someway for the code to handle that the text in the cell changes.

    Thanks in Advance

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,697
    If the cells always contain LotNumber=xxx try something like

    =SUBSTITUTE(Sheet1!A1,"LotNumber=","")+0

  3. #3
    Registered User
    Join Date
    10-11-2007
    Posts
    11
    That works, thanks long legs. I was wondering if there is a way to have the macro delete text in a cell, for instance, I want to delete the first 8 characters in a cell. Example, LotNumber=56203.01 I can clear the LotNumber= using your code, but in anther box I only need "01". The number is always changing, so something that would go in the box and delete the first 6 characters in a cell, leaving me only with the actual wafer number, which in this case is "01". Problems are the wafer numbers are not sequential and the Lot number changes frequently.

  4. #4
    Registered User
    Join Date
    10-01-2007
    Posts
    23
    Is the wafer number always 2 digits? If it is you could do something like this:

    Please Login or Register  to view this content.
    Where the above case Range("B4") Would be the LotNumber in cell b4. B5 would then return the last 2 digits of the lot number.

  5. #5
    Registered User
    Join Date
    10-11-2007
    Posts
    11
    It is and that is exactly what i was looking for!

    Thanks Paul

+ 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