+ Reply to Thread
Results 1 to 5 of 5

FORMULA Which searches one column for a name, then copies all Data in that row to a sheet!

  1. #1
    Registered User
    Join Date
    07-26-2012
    Location
    Tetbury, England
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    73

    FORMULA Which searches one column for a name, then copies all Data in that row to a sheet!

    Hey All,

    I have attached a spreadsheet to look at.

    What I need to do is: On the sheet named "MAIN INPUT" I will log all the data. Then I will have a seperate sheet named for each persons individual errors. What I want is to make it so it searches Column B for the NAME of the person who made the error. Then to copy the data in columns A to O for that row to a seperate sheet. I want it to copy the data to the sheet with name that matches the person in column B...If this is making sense so far?

    On the individual peoples sheets, I want no duplicates to be copied, and I want them to be copied in the same order as they appear on the Main Input sheet. With no gaps so they appear sequencially with no spaces.

    Not sure whether formulas or Macros are best for this....anyway...HELP!!!

    Any Q's do let me know!

    Thanks!

    Chris
    Attached Files Attached Files

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: FORMULA Which searches one column for a name, then copies all Data in that row to a sh

    Add this formula to P2 of the main sheet:

    =B2&"_"&COUNTIF(B$2:B2,B2)

    copied down

    Then Select the first name sheet, hold the Shift key and then select the last name sheet... this groups all the sheets.

    In A1 of the visible sheet enter formula:

    =MID(CELL("filename",$A$1),FIND("]",CELL("filename",$A$1))+1,255)

    This should get the person's name for that sheet.

    Then in a row below that enter formula:

    =IFERROR(INDEX('MAIN INPUT'!A:A,MATCH($A$1&"_"&ROWS($A$1:$A1),'MAIN INPUT'!$P:$P,0)),"")

    copied across to column O and down as far as you want.

    you may need to format date columns as Date

    Then you can right-click any sheet and Ungroup Sheets.

    Now each sheet should have it's respective data from the main one.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    08-29-2012
    Location
    Slough
    MS-Off Ver
    Excel 2007
    Posts
    469

    Re: FORMULA Which searches one column for a name, then copies all Data in that row to a sh

    Hi Chris,

    Try this and drag it down and across. You will need to put the name of each person in the worksheet (This formula says B1)

    =INDEX('MAIN INPUT'!$A1:$O28,MATCH($B$1,'MAIN INPUT'!$B1:$B100,0),1)

    EDIT:NBVC does things fancy, too clever for me to compete with!!

    Danny

  4. #4
    Registered User
    Join Date
    07-26-2012
    Location
    Tetbury, England
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    73

    Re: FORMULA Which searches one column for a name, then copies all Data in that row to a sh

    NBVC!

    You are a genius!

    DannyJ - Yours does also work, but I don't find it as easy to get on with.

    Thanks both so much for your help!

    Legends!

  5. #5
    Forum Contributor
    Join Date
    10-02-2012
    Location
    Bumi Nusantara
    MS-Off Ver
    Excel 2010; Excel 2016
    Posts
    136

    Re: FORMULA Which searches one column for a name, then copies all Data in that row to a sh

    write down this code in VBE module
    Please Login or Register  to view this content.
    please see attached file

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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