+ Reply to Thread
Results 1 to 8 of 8

Complicated Find - Replace

Hybrid View

  1. #1
    Registered User
    Join Date
    12-05-2008
    Location
    Missouri
    Posts
    30

    Complicated Find - Replace

    I've attached the file (i think) to make thing easier.

    I am trying to get look at the first row of numbers for a part and then place in a corresponding number below. There are some examples already there such as 10 has 910 under it, and 5 has 400 under it.

    I was currently playing around with this code:

    'Value you want to find
    
    xFind = 5
    
    'Value you want to input
    
    xReplace = 50
    
        Cells.Find(What:=xFind, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
    
            xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, 
    
    MatchCase:=False _
    
            , SearchFormat:=False).Activate
    
        ActiveCell.Offset(-1).Value = xReplace
    But i don't know that this is the right direction to take with it and it doesn't seem to want to cooperate with me. Any suggestions?
    Attached Files Attached Files
    Last edited by abertrand; 01-13-2009 at 10:47 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Attach an example workbook
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    12-05-2008
    Location
    Missouri
    Posts
    30
    I keep getting a database error when attaching the zip file. It's a pretty big file 2.3MB zipped, but that is still under the size limit. I've tried 5 times.

    I uploaded a smaller sample version of the file.
    Last edited by abertrand; 01-13-2009 at 10:48 AM.

  4. #4
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606
    I don't know about anyone else, but I'm struggling to understand what you want to do and how it is determined. Can you expand on what you're doing?

  5. #5
    Registered User
    Join Date
    12-05-2008
    Location
    Missouri
    Posts
    30
    No Problem.

    I currently have a list of parts with numbers that correspond to work centers stretched out horizontally after the part number. I would like a macro that will search these work center numbers and add a new number below the old.

    An example is how I have 10 with 910 below or 5 with 400 below. I did that by hand, but I have thousands of parts to work through and would like for it to be accomplished automatically.

  6. #6
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606
    So do you have a list of part numbers and numbers that go below them? If so, could you not use a LOOKUP formula?

+ 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