+ Reply to Thread
Results 1 to 5 of 5

Replace values between two keywords in a colmn

  1. #1
    Registered User
    Join Date
    01-30-2014
    Location
    Rotterdam, The Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    3

    Replace values between two keywords in a colmn

    Hi All,

    I'm having trouble solving the following problem:
    I have data in which there are important keywords within a row (e.g.,# Message: FacesSc0_1) that are 'boundary markers' for data that is relevant to me. What I want to do is to select the data in the column between two such keywords, replace them all with the same specific value, and delete the other rows.

    For example a column may look like this:

    534.88
    534.78
    # Message: FacesSc0_1
    534.78
    534.55
    534.59
    # Message: FacesSc0_2
    534.55
    534.55
    # Message: FacesSc0_3
    534.78
    534.55
    534.59
    # Message: FacesSc0_4

    I would like to replace the values in the cells between "# Message: FacesSc0_1" and "# Message: FacesSc0_1" with the value 1, delete the values between "# Message: FacesSc0_2" and "# Message: FacesSc0_3", and replace the values in the cells between "# Message: FacesSc0_3" and "# Message: FacesSc0_4" with value 2. The resulting column would be reduced to this:

    # Message: FacesSc0_1
    1
    1
    1
    # Message: FacesSc0_2
    # Message: FacesSc0_3
    2
    2
    2
    # Message: FacesSc0_4

    Can anyone help me out?

    Many thanx in adance!
    Last edited by huijding; 02-03-2014 at 07:19 AM.

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Replace values between two keywords in a colmn

    Does this help?

    Please Login or Register  to view this content.
    Last edited by JOHN H. DAVIS; 01-31-2014 at 09:28 AM.

  3. #3
    Registered User
    Join Date
    01-30-2014
    Location
    Rotterdam, The Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Replace values between two keywords in a colmn

    Hi John,

    Thank you for your super quick response to my question!
    It helped a great deal. You just saved me hours and hours of work...

    Best,

    Jorg

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Replace values between two keywords in a colmn

    You're welcome. Glad to help out and thanks for the feedback. Please comply with Forum Rule No. 9.


    9. Acknowledge the responses you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved". Or click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Dropdown option or Edit button will not appear -- ask a moderator to mark it.

  5. #5
    Registered User
    Join Date
    01-30-2014
    Location
    Rotterdam, The Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Replace values between two keywords in a colmn

    Thank you for pointing this out. Well, I just happily marked it as SOLVED!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Search for keywords and copy rows containing keywords to new sheet
    By lenorsk in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-15-2013, 06:54 AM
  2. [SOLVED] HDI - Return multiple keywords in a text column based on a set of available keywords
    By zneiley in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-25-2013, 01:32 PM
  3. IF formula that checks several values and several keywords
    By vlife in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-01-2013, 11:40 AM
  4. "Find and Replace" missing the ability to replace values?
    By dylanemcgregor in forum Excel General
    Replies: 6
    Last Post: 06-05-2013, 01:13 AM
  5. How to get text below in a new colmn?
    By Bandini in forum Excel General
    Replies: 7
    Last Post: 10-15-2012, 12:38 PM

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