+ Reply to Thread
Results 1 to 8 of 8

Which formula can I use to replace data based on various criteria?

  1. #1
    Registered User
    Join Date
    11-18-2011
    Location
    London, UK
    MS-Off Ver
    Excel 2003
    Posts
    16

    Which formula can I use to replace data based on various criteria?

    I have the following data set (Data set 1)

    Team 1 s s Team 2
    Team 3 s s Team 4
    Team 5 s s Team 6
    Team 7 s s Team 8



    I have another data set (Data set 2), with a few results in it,

    Team 1 4 2 Team 2
    Team 7 1 0 Team 8


    I want to automatically replace the scores from data set 2 into data set 1. For those that don't match up, it should just say "s"

    I have about 200-300 results and 500 fixtures to do it manually.
    Last edited by acousticsman; 06-13-2015 at 11:47 AM.

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Which formula can I use to replace data based on various criteria?

    What version of Excel does this have to work in?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    11-18-2011
    Location
    London, UK
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Which formula can I use to replace data based on various criteria?

    I have excel 2013

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Which formula can I use to replace data based on various criteria?

    One way...

    Data Range
    A
    B
    C
    D
    1
    Team 1
    4
    2
    Team 2
    2
    Team 3
    s
    s
    Team 4
    3
    Team 5
    s
    s
    Team 6
    4
    Team 7
    1
    0
    Team 8
    5
    ------
    ------
    ------
    ------
    6
    7
    Team 1
    4
    2
    Team 2
    8
    Team 7
    1
    0
    Team 8


    This array formula** entered in B1:

    =IFERROR(IF(MATCH($A1,$A$7:$A$8,0)=MATCH($D1,$D$7:$D$8,0),INDEX(B$7:B$8,MATCH(1,($A$7:$A$8=$A1)*($D$7:$D$8=$D1),0)),1/0),"s")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Copy across to C1 then down as needed.

  5. #5
    Registered User
    Join Date
    11-18-2011
    Location
    London, UK
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Which formula can I use to replace data based on various criteria?

    this is working, but copying down the list in data set 1 doesn't work

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Which formula can I use to replace data based on various criteria?

    Can you post a SMALL sample file and show us what result you expect?

    A SMALL file will have about 20 rows worth of data.

  7. #7
    Registered User
    Join Date
    11-18-2011
    Location
    London, UK
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Which formula can I use to replace data based on various criteria?

    Its strange, it works on a fresh file, but not on the original file.

    I'll work it out, thank you for you help.

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Which formula can I use to replace data based on various criteria?

    Good deal. Thanks for the feedback!

+ 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] Replace values in rows based on criteria in column B
    By Marq555 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-03-2015, 10:25 AM
  2. Find and replace multiple values based on criteria
    By samuelhzb in forum Excel General
    Replies: 6
    Last Post: 01-04-2015, 01:25 PM
  3. Criteria based find and replace
    By doubl3d80 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-17-2014, 12:19 PM
  4. [SOLVED] Find blank cell and replace based on criteria
    By anrichards22 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 11-27-2012, 05:36 AM

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