+ Reply to Thread
Results 1 to 8 of 8

Automatically populate columns in Excel based on another column information

  1. #1
    Registered User
    Join Date
    10-04-2018
    Location
    Metcalfe, Ontario
    MS-Off Ver
    2016
    Posts
    4

    Automatically populate columns in Excel based on another column information

    I need to put in a formula that will automatically populate B and C based on the number in A, i.e. everytime I type in the employee number listed, B and C will automatically populate with Joe Black and 2018-10-04
    A B C
    1 EMPLOYEE NUMBER NAME HIRE DATE
    2 12345678989 Joe Black 2018-10-04

  2. #2
    Forum Contributor
    Join Date
    09-19-2018
    Location
    USA
    MS-Off Ver
    2016
    Posts
    208

    Re: Automatically populate columns in Excel based on another column information

    This can usually be done with lookup formulas (e.g. VLOOKUP or INDEX/MATCH), but you'll have to provide more details as to your data layout and values to get an exact formula.

  3. #3
    Registered User
    Join Date
    10-04-2018
    Location
    Metcalfe, Ontario
    MS-Off Ver
    2016
    Posts
    4

    Re: Automatically populate columns in Excel based on another column information

    I was thinking of LOOKUP just not sure how to do the formula or how to attach an Excel document to this thread if you can.
    Column A is titled: HEALTH CARD #
    Column B is titled: NAME
    Column C is titled: DATE OF HOSPITAL VISIT
    - Employer wants to be able to type in the HEALTH CARD # and have the NAME and DATE OF HOSPITAL VISIT to automatically populate. This will be a long list of health card #'s and names/dates and health card #'s will not be in numerical order - scattered numbers, i.e., next time the employer types in 12345678989, Column B and C will automatically populate and the same with the other Health Card #'s. I don't know if this can be done.

  4. #4
    Forum Contributor
    Join Date
    09-19-2018
    Location
    USA
    MS-Off Ver
    2016
    Posts
    208

    Re: Automatically populate columns in Excel based on another column information

    It can be done if you have a "lookup" table somewhere else. If you're trying to enter formulas into the same table accumulating the data, that won't work very well without VBA code. (You'd be over-writing formulas with static text a bunch, I'd imagine.) Look in Excel Help for the VLOOKUP function for how to use that function (or search Google/this forum.)

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Automatically populate columns in Excel based on another column information

    If you want to be able to attach an Excel workbook (sanitise it first), this is how to do it:

    Click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and then on Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post. Don't use the Paperclip icon (attachments button), as it doesn't work on this forum.

    Hope this helps.

    Pete

  6. #6
    Registered User
    Join Date
    10-04-2018
    Location
    Metcalfe, Ontario
    MS-Off Ver
    2016
    Posts
    4
    Thanks. This is helpful.

  7. #7
    Registered User
    Join Date
    10-04-2018
    Location
    Metcalfe, Ontario
    MS-Off Ver
    2016
    Posts
    4

    Re: Automatically populate columns in Excel based on another column information

    I tried to attach an excel document but not sure it worked.
    Attached Files Attached Files

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Automatically populate columns in Excel based on another column information

    In the attached file I have coloured cell I2 yellow to indicate that is where you should enter the employee number (for convenience I have set up a Data Validation drop-down on that cell, so that you don't have to type a multi-digit number). The name appears in cell J2 because of this formula:

    =IFERROR(VLOOKUP(I2,A:C,2,0),"")

    and the date of birth is generated by this formula in K2:

    =IFERROR(VLOOKUP(I2,A:C,3,0),"")

    Notice that the two formulae are very similar - the only difference is the third parameter of the VLOOKUP function which determines the column number (2 and 3) which is where the data will be returned from.

    Just change the Employee number in I2 using the drop-down, and the other data will immediately change.

    Hope this helps.

    Pete
    Attached Files Attached Files

+ 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] populate a 4th column (D) based on 3 columns (A,B,C)
    By sirgeo in forum Excel Formulas & Functions
    Replies: 22
    Last Post: 07-17-2018, 11:14 PM
  2. Populate one column based the condition of two other columns
    By warriorpoet7176 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-18-2014, 01:22 AM
  3. Replies: 3
    Last Post: 11-07-2013, 11:40 AM
  4. Replies: 1
    Last Post: 09-12-2012, 10:40 AM
  5. Replies: 3
    Last Post: 02-28-2012, 11:54 AM
  6. [SOLVED] populate columns A & B based on lookup in column C
    By linksavage in forum Excel General
    Replies: 3
    Last Post: 12-22-2010, 02:35 PM
  7. [SOLVED] how do you have information from one tab automatically populate i
    By excel newbe in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-19-2006, 07: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