+ Reply to Thread
Results 1 to 9 of 9

Search a column for a name and if found copy cell from the same row in a different column

  1. #1
    Registered User
    Join Date
    07-10-2012
    Location
    Orpington
    MS-Off Ver
    Excel 2010
    Posts
    8

    Search a column for a name and if found copy cell from the same row in a different column

    I have tried the following IF statement

    =IF('Unassigned Players'!E4:E18="Colin",'Unassigned Players'!C4:C18,"")

    but that just returns the #VALUE! error.

    For information "Colin" exists in 'Unassigned Players'!E7 and I would like to copy the cell from C7

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Search a column for a name and if found copy cell from the same row in a different col

    Perhaps

    =IF(countif('Unassigned Players'!E4:E18,"Colin"),"Colin","")
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    07-10-2012
    Location
    Orpington
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Search a column for a name and if found copy cell from the same row in a different col

    Thanks for your quick reply Fotis1991. However this is not quite what I need.

    The first bit works ie

    =IF(countif('Unassigned Players'!E4:E18,"Colin") and finds the entry for Colin at E7. However it then populates the cell with Colin but I want the cell populated with whatever is in column C on the same row as where it has found Colin. Hope that makes sense?

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Search a column for a name and if found copy cell from the same row in a different col

    Do you mean?

    =INDEX('Unassigned Players'!C4:C18,MATCH("COLIN",'Unassigned Players'!E4:E18,0))

  5. #5
    Registered User
    Join Date
    07-10-2012
    Location
    Orpington
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Search a column for a name and if found copy cell from the same row in a different col

    Brilliant - that has done the trick. Exactly what I needed - thanks ever so much for your help.

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Search a column for a name and if found copy cell from the same row in a different col

    ......................

  7. #7
    Registered User
    Join Date
    07-10-2012
    Location
    Orpington
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Search a column for a name and if found copy cell from the same row in a different col

    Sorry Fotis1991 - one issue - if Colin doesn't exist (which it might not) in Column E then the cell is populated with #N\A - is it possible that if Colin is not in column E the cell can be left blank?

  8. #8
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Search a column for a name and if found copy cell from the same row in a different col

    =iferror(INDEX('Unassigned Players'!C4:C18,MATCH("COLIN",'Unassigned Players'!E4:E18,0)),"")

  9. #9
    Registered User
    Join Date
    07-10-2012
    Location
    Orpington
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Search a column for a name and if found copy cell from the same row in a different col

    Brilliant once again Fotis1991 - thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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