+ Reply to Thread
Results 1 to 11 of 11

match-substitute

  1. #1
    Registered User
    Join Date
    10-04-2013
    Location
    sheffield, england
    MS-Off Ver
    Excel 2010
    Posts
    38

    match-substitute

    dear all,

    i have some data in xls -
    col A - patient hospital no (correct entry)
    col B - corresponding patient age (correct entry)
    col C - patient hospital no (correct entry)
    col D - corresponding patient age (may be correct or incorrect entry)

    Task: pl provide formula in col E so that:
    - match hospital no. between col A & col C - ie., cell in col A is matched with cell in col C
    - then match (corresponding) age in col B with age in col D for matched hosp no
    - if for similar hospital no., if age does not match (incorrect entry), the correct age (from col B) is entered into col D - substituting the existing incorrect age

    hope that is clear enough. pl see attached example for your understanding.

    thanks for help.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    564

    Re: match-substitute

    Formula can return a value in the same cell where it is entered. Meaning, you cannot replace value in column D by a formula entered in column E. Are you fine using a macro?

  3. #3
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: match-substitute

    Please Login or Register  to view this content.
    See the attached file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  4. #4
    Valued Forum Contributor
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    564

    Re: match-substitute

    oeldere..
    WHERE MATCH IS FOUND, IF CORRESPONDING VALUE IN COL B DOES NOT MATCH VALUE IN COL D, SUBSTITUTE VALUE IN COL D WITH VALUE IN COL B.
    FOR EG., A3 MATCHES WITH C2, BUT D2 IS NOT EQUAL TO B3, THEREFORE D2 IS CHANGED TO B3 I.E., = 23
    Above formula is entered in col E and it wouldn't change value in col D.

  5. #5
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: match-substitute

    Please ignore this post.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: match-substitute

    You can't change the value in column D, without using VBA.

    You could copy => paste special => value from column E to column D

  7. #7
    Registered User
    Join Date
    10-04-2013
    Location
    sheffield, england
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: match-substitute

    Quote Originally Posted by haripopuri View Post
    Formula can return a value in the same cell where it is entered. Meaning, you cannot replace value in column D by a formula entered in column E. Are you fine using a macro?
    ok. pl send macro.

  8. #8
    Registered User
    Join Date
    10-04-2013
    Location
    sheffield, england
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: match-substitute

    Thanks for your help.

  9. #9
    Valued Forum Contributor
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    564

    Re: match-substitute

    Not perfect but this is what I could come up with quickly.
    Please Login or Register  to view this content.

  10. #10
    Valued Forum Contributor
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    564

    Re: match-substitute

    Not perfect but this is what I could come up with quickly.
    Please Login or Register  to view this content.

  11. #11
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: match-substitute

    @murtigvs

    Please Login or Register  to view this content.
    Since you got help from several members, it is good to refer to whom you responding.

+ 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. How to use a substitute formula to substitute text entries to a different text entry
    By andybocchi in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-01-2010, 07:50 PM
  2. [SOLVED] search column, hyperlink, offset, substitute, match (omg)
    By nastech in forum Excel General
    Replies: 13
    Last Post: 07-13-2006, 05:05 PM
  3. substitute for =
    By Gary's Student in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-06-2005, 07:05 PM
  4. [SOLVED] substitute for =
    By CEN7272 - ExcelForums.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  5. [SOLVED] substitute
    By AMK in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-12-2005, 09:05 PM

Tags for this Thread

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