+ Reply to Thread
Results 1 to 5 of 5

Search sheet for name in row and then copy cell contents where name exists in all sheets

  1. #1
    Registered User
    Join Date
    07-13-2015
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    2

    Search sheet for name in row and then copy cell contents where name exists in all sheets

    Hi, i have a workbook for mobile phone bills. Each month a new sheet is created, with one row per staff member. The first month worksheet has the employees department along with call costs and number of call etc, subsequent sheets are missing the department (Cost Centre Code1) - please see inline example for column headings..
    What function can i use to read each staff members department from the first worksheet and then populate the subsequent worksheets with that missing call information if their mobile number is found?
    Untitled1.xlsx
    If you assume that first sheet with departmental data is Sheet1 and subsequent months are Sheet2 Sheet3 etc.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Search sheet for name in row and then copy cell contents where name exists in all shee

    How are the data on sheets 2 and 3, etc, organised? You've left us guessing....
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,570

    Re: Search sheet for name in row and then copy cell contents where name exists in all shee

    In the following file find that the employee's name and department are both populated to sheet2 when the employee's phone number is entered.

    Copy of Untitled1.xlsx

    Hope this helps.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Search sheet for name in row and then copy cell contents where name exists in all shee

    Before proceeding along the lines you request can I ask why you want to add subsequent months data in separate tabs? Almost certainly this is not an optimum way to proceed. You'll be better served by adding each month's data underneath the preceding months and creating an additional column to hold a date for each record - which could be say the 1st of each month.

    Then all you need is a second sheet that holds a table of phone numbers in one column and their associated cost centre codes in another. Then each month new data is added you just need to add a regular VLOOKUP() function to the Cost centre code column for the new month's data - or better still have a simple macro to do it.

    Any subsequent analysis will be simplified if you adopt this approach.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  5. #5
    Registered User
    Join Date
    07-13-2015
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    2

    Re: Search sheet for name in row and then copy cell contents where name exists in all shee

    Thanks for your help - i will add another sheet with phone number and costs centre and then complete a vlookup

+ 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. Macro Problem: Copy contents of cell; search for contents in another workbook
    By jfishstik in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-04-2014, 12:11 PM
  2. [SOLVED] Auto copy contents from sheets 2 and 3 to sheet 1 if column heading contains set words
    By Thomas Andrews in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 06-09-2014, 11:59 AM
  3. Replies: 4
    Last Post: 08-16-2013, 03:51 AM
  4. Code to clear contents of specific cells based upon if key exists in other sheets
    By seputus in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-31-2013, 07:25 PM
  5. [SOLVED] Summary sheet - copy cell contents from multiple sheets to one summary sheet
    By jsmity in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-21-2013, 10:32 AM
  6. Return Cell Contents by Sheet Name Search
    By gratedwasabi in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-26-2012, 10:45 PM
  7. Replies: 1
    Last Post: 03-24-2009, 04:35 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