+ Reply to Thread
Results 1 to 2 of 2

Need some assistance with replacing contents of a cell with another based on search result

  1. #1
    Registered User
    Join Date
    02-24-2014
    Location
    Minneapolis
    MS-Off Ver
    Excel 2010
    Posts
    1

    Need some assistance with replacing contents of a cell with another based on search result

    Hi,

    I'm hoping that someone can help me, as I'm fairly new with Excel.

    My current problem is that I need to search two tabs of data and use the results to modify the contents of one cell in the first tab.

    I'll try to be as clear as possible:

    tab1 has relevant cells "a" and "b", same row
    tab2 has 3 relevant cells "c", "d", and "e", all on the same row

    All cells are text values - some digits, but should be treated as a regular String.

    The search needs to look at cells "a" and "b", find their match in "c" and "d", then replace the original value of "b" with the value in "e" after a match has been found.

    Please let me know if you have questions. I can write up a specific example if it would help as well.
    Last edited by Harkin; 02-24-2014 at 02:30 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,945

    Re: Need some assistance with replacing contents ** a cell with another based on search re

    Hi and welcome to the forum

    It would have been easier if you provided sample data, but try this...

    Sheet 1
    A
    B
    C
    1
    aa1 bb1 cc1
    2
    aa2 bb2 cc2
    3
    aa3 bb3 cc3
    4
    aa4 bb4 cc4
    5
    aa5 bb5 cc5
    6
    aa6 bb6 cc6
    7
    aa7 bb7 cc7
    8
    aa8 bb8 cc8
    9
    aa9 bb9 cc9
    10
    aa10 bb10 cc10


    Sheet 2
    C
    D
    E
    1
    aa1 bb1 cc1
    2
    aa2 bb2 cc2
    3
    aa3 bb3 cc3
    4
    aa4 bb4 cc4
    5
    aa5 bb5 cc5
    6
    aa6 bb6 cc6
    7
    aa7 bb7 cc7
    8
    aa8 bb8 cc8
    9
    aa9 bb9 cc9
    10
    aa10 bb10 cc10


    In sheet 1 C1, copy this ARRAY formula down...
    =INDEX('Sheet 2'!$E$1:$E$100,MATCH('Sheet 1'!A1&'Sheet 1'!B1,'Sheet 2'!$C$1:$C$100&'Sheet 2'!$D$1:$D$100,0))...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. Search cell text and output different values based on result in another cell
    By tbarn1980 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-14-2013, 09:54 PM
  2. Replacing a word with the contents of a particular cell
    By Trtrnx in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-13-2011, 04:12 PM
  3. Replies: 0
    Last Post: 02-05-2010, 10:43 AM
  4. Find cell based on formula result and delete contents
    By Big Chris in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-29-2006, 10:07 AM
  5. Replacing Contents of 1 Cell to Another.
    By John1950 in forum Excel General
    Replies: 3
    Last Post: 09-23-2005, 01:26 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