+ Reply to Thread
Results 1 to 4 of 4

Comparing data between sheets and adding cell data

  1. #1
    Registered User
    Join Date
    07-09-2010
    Location
    LA, CA
    MS-Off Ver
    Excel 2003
    Posts
    23

    Comparing data between sheets and adding cell data

    Hi all,

    I have two sheets. The first includes names of people and their normal work shift (AM or PM)
    On a second sheet, I am regularly pasting a roster of all employees onto Column A. I would like that the text "AM or "PM" will be appropriately added to column B based on the info that is found within the first sheet.

    Any thoughts?

    Thanks,
    Eitan
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Comparing data between sheets and adding cell data

    In B1 of sheet2, use the following formula:

    =IFERROR(INDEX(Sheet1!$B$1:$B$20,MATCH(Sheet2!$A1,Sheet1!$A$1:$A$20,0)),"")

    Make sure that the ranges (here rows 1-20) fit or exceed your list on sheet1 and fill the formula down through column B of sheet two as far as you think you'll need. It'll show a blank until a corresponding entry is made in column A, then it'll perform the lookup and populate the cell. See attached for more clarity:
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    07-09-2010
    Location
    LA, CA
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Comparing data between sheets and adding cell data

    You are a Star! Thanks so much

    Eitan

  4. #4
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Comparing data between sheets and adding cell data

    Glad to help, good luck!

+ 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. Adding & comparing lists of different data together
    By Aredeekay in forum Excel General
    Replies: 1
    Last Post: 04-22-2016, 01:51 PM
  2. Comparing rows of data and adding 'points' for every duplicate
    By dee1989 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-30-2013, 07:48 AM
  3. Comparing data in two worksheets and adding data
    By excelnovice66 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-12-2013, 10:21 AM
  4. [SOLVED] Comparing lists, adding data, and color-coding changes
    By Gobaith in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-03-2012, 05:43 PM
  5. Insert data by looking up and comparing data to other sheets
    By tahirfayyaz in forum Excel General
    Replies: 1
    Last Post: 01-20-2010, 10:36 PM
  6. Need help with Comparing/adding data in cells
    By lab87 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-28-2006, 04:00 PM
  7. Comparing data between sheets, and copying rows with data
    By Fleone in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-02-2006, 02:00 PM

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