+ Reply to Thread
Results 1 to 13 of 13

Find then Replace Adjacent Cell with New Number

  1. #1
    Registered User
    Join Date
    01-28-2017
    Location
    Australia
    MS-Off Ver
    OLD
    Posts
    7

    Question Find then Replace Adjacent Cell with New Number

    Good Morning All,

    First time here so be gentle.
    I've got very little Excel formula experience but I need help please.
    I need to find and replace entire workbooks with new times for each employee

    10 Barry

    The above is in separate columns ie 10 = A1 and Barry = B1
    Note: Not always in Column A & B

    I need a simple way to search the entire workbook for Barry and replace left adjacent cell with example 5
    Then it would end up like this
    5 Barry

    Please provide step by step as I have no idea what I'm doing :P

    Thank you....

    n0mad

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Find then Replace Adjacent Cell with New Number

    Hi n0mad,

    I need a simple way to search the entire workbook for Barry and replace left adjacent cell
    That is a relative statement based on what your workbook actually looks like.

    I'm not even sure a formula is going to work for you as in can't replace the contents of an already filled in cell.

    This is not nearly enough to work with.

    The above is in separate columns ie 10 = A1 and Barry = B1
    Note: Not always in Column A & B
    Please post a representative copy of what your workbook looks like with as many scenarios as possible. Before and after is always welcomed.
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    01-28-2017
    Location
    Australia
    MS-Off Ver
    OLD
    Posts
    7

    Re: Find then Replace Adjacent Cell with New Number

    m0rning Jeff,

    Example of each Spreadsheet looks somethink like this

    10 Barry
    5 Dave
    20 Sue
    15 Fred

    I hope this helps.

    n0mad

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Find then Replace Adjacent Cell with New Number

    So you just want the 10 to the left of Barry replaced with a 5 and that's it?

    What about your comment?

    Note: Not always in Column A & B
    And are you wanting to use VBA?
    Last edited by jeffreybrown; 01-28-2017 at 05:58 PM.

  5. #5
    Registered User
    Join Date
    01-28-2017
    Location
    Australia
    MS-Off Ver
    OLD
    Posts
    7

    Re: Find then Replace Adjacent Cell with New Number

    Yes 10 to the left of Barry replaced with 5

    Comment was explaining that Barry can be in any column (Not always Column B)

    Yer simple thing I need to change but doing this manually is driving me nuts.

    Hope someone can help........ ?

    n0mad

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Find then Replace Adjacent Cell with New Number

    For a quick easy fix, why not just filter on the column with Barry, select the cells starting from the first cell, type in 5 and select Ctrl + Enter.

    All your change to Barry will be applied to once.

  7. #7
    Registered User
    Join Date
    01-28-2017
    Location
    Australia
    MS-Off Ver
    OLD
    Posts
    7

    Re: Find then Replace Adjacent Cell with New Number

    When you are working with over 50 spreadsheets doing it this way (Filter Column) is too long and I've been doing it manually for a few months now and would really like to find a quicker way to do this.

    There must be a way to do this ?

    n0mad

  8. #8
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Find then Replace Adjacent Cell with New Number

    Try this on a copy of your workbook. Code will work on all the worksheet in the workbook.

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    01-28-2017
    Location
    Australia
    MS-Off Ver
    OLD
    Posts
    7

    Re: Find then Replace Adjacent Cell with New Number

    Jeff please explain how I use this code in excel ? Step by Step please.....

    Thanks..

    n0mad

  10. #10
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Find then Replace Adjacent Cell with New Number

    Paste code in a Normal module
    • Where to paste code
    • Highlight macro on Forum >> Ctrl + C >> Open your workbook
    • Alt + F11 >> opens the Visual Basic Editor (VBE)
    • Ctrl + R >>opens the Project Explorer (if not already open on left side of screen)
    • Insert menu >> Module or Alt + I, M >> activates the Insert menu and inserts a Standard Module
    • Paste code >> Ctrl + V (right side of screen)
    • Alt + Q >> exits VBE and returns to Excel
    • Back in Excel >> Alt + F8 >> Macro Dialog Box >> Highlight macro >> Run
    Attached Files Attached Files
    Last edited by jeffreybrown; 01-28-2017 at 07:37 PM.

  11. #11
    Registered User
    Join Date
    01-28-2017
    Location
    Australia
    MS-Off Ver
    OLD
    Posts
    7

    Re: Find then Replace Adjacent Cell with New Number

    Thanks for your hard work Jeff I'll try it tonight.


    PEACE...

    n0mad

  12. #12
    Registered User
    Join Date
    01-28-2017
    Location
    Australia
    MS-Off Ver
    OLD
    Posts
    7

    Re: Find then Replace Adjacent Cell with New Number

    I tested your spreadsheet attached and when executing the MACRO it only works on
    EG Sheet 1 only on A1 and B1

    What About A4 and B4 that also has a Barry ?
    I have Barry all over my Spreadsheets

    n0mad

  13. #13
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Find then Replace Adjacent Cell with New Number

    I tested your spreadsheet attached and when executing the MACRO it only works on EG Sheet 1 only on A1 and B1

    What About A4 and B4 that also has a Barry? I have Barry all over my Spreadsheets
    That is why I asked for you to provide a spreadsheet as to exactly what you have. Once you provide a representative spreadsheet I will take another look.

+ 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. Looping 'find' to find a value and replace a value in an adjacent column
    By Boltsie in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-12-2016, 06:54 PM
  2. Find and replace with adjacent cell value.
    By james252 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-12-2014, 03:56 AM
  3. [SOLVED] Macro to find duplicate value and replace adjacent cell with different value
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-18-2014, 09:52 AM
  4. Find a number and replace the adjacent cell with other number
    By shafath03 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-20-2013, 09:09 PM
  5. Find String and Replace With Adjacent Cell
    By Steve0492 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-29-2012, 05:19 PM
  6. find and replace - based on 3 character in adjacent cell
    By isabella in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-24-2010, 08:51 PM
  7. Find, Replace with and then replace adjacent cell
    By Craig2097 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-18-2009, 12:42 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