+ Reply to Thread
Results 1 to 5 of 5

Formula to automatically fill in a Column with preexisting data?

Hybrid View

  1. #1
    Registered User
    Join Date
    06-25-2014
    Location
    USA
    MS-Off Ver
    2007
    Posts
    6

    Question Formula to automatically fill in a Column with preexisting data?

    Hi,

    This really has me stumped. My workbook has two worksheets, with one table on each page. I am trying to get Column A on worksheet 2 to automatically fill in the initials based on the fact the column B has the same names.

    For example.
    Worksheet 1 has three fields: Initials, Product, Category. All are already filled in.
    Worksheet 2 has a blank initials column. The Product column has the same names as in worksheet 1 already filled in.

    sample 1.jpg
    sample 2.jpg

    Please see the example.

    Thank you very much.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    04-12-2012
    Location
    India
    MS-Off Ver
    Excel 2007, 2010, 2013, 2016, 2019, Office 365, Google Spreadhsheet
    Posts
    640

    Re: Formula to automatically fill in a Column with preexisting data?

    Go to Sheet2, A9, and type the following function to lookup the initials from Sheet 1 (Main Table)

    Formula: copy to clipboard
    =INDEX(MainTable!A:A,MATCH([@Product],MainTable!B:B,0),1)



    Cheers!!
    Anil Dhawan
    Thanks,
    Anil Dhawan


    Click *Add Reputation to say "Thanks" and don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved) if you are satisfied.

    Don't stop when you are tired. STOP when you are done!

  3. #3
    Registered User
    Join Date
    06-25-2014
    Location
    USA
    MS-Off Ver
    2007
    Posts
    6

    Re: Formula to automatically fill in a Column with preexisting data?

    Quote Originally Posted by adhawan06 View Post
    Go to Sheet2, A9, and type the following function to lookup the initials from Sheet 1 (Main Table)

    Formula: copy to clipboard
    =INDEX(MainTable!A:A,MATCH([@Product],MainTable!B:B,0),1)



    Cheers!!
    Anil Dhawan
    Thank you very much, this worked!

    One last thing. Can you please break down what the formula "=INDEX(MainTable!A:A,MATCH([@Product],MainTable!B:B,0),1)" does? I do understand that "MainTable!" is a link to that sheet.

    Thank you very much Anil Dhawan!

  4. #4
    Valued Forum Contributor
    Join Date
    04-12-2012
    Location
    India
    MS-Off Ver
    Excel 2007, 2010, 2013, 2016, 2019, Office 365, Google Spreadhsheet
    Posts
    640

    Re: Formula to automatically fill in a Column with preexisting data?

    Glad It worked and met your result...

    This function is looking up the value thats it. The way Vlookup works in the same way this functions is returning the only difference is that it is picking the left side value whereas Vlookup only picks up value from the right side of the lookup range.

    Formula: copy to clipboard
    =INDEX(MainTable!A:A,MATCH([@Product],MainTable!B:B,0),1)


    In the above function, INDEX is going to pick the Intitals from MainTable Sheets, then Match function will look up the row number by looking up between MainTable (Sheet) and "Sheet2" and in last 1 is used to pick the column 1.

    Hope this will make clarity.

    If your requirement is fulfilled, please mark this thread as SOLVED and *Add Reputation.


    Cheers!!!
    Anil Dhawan

  5. #5
    Registered User
    Join Date
    06-25-2014
    Location
    USA
    MS-Off Ver
    2007
    Posts
    6

    Re: Formula to automatically fill in a Column with preexisting data?

    Thank you very much Anil Dhawan! Will add reputation and mark as solved!

+ 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. Replies: 10
    Last Post: 01-02-2015, 11:05 AM
  2. Formula to Automatically Fill Blank With Next fill cell's data?
    By VMoney in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-22-2013, 05:11 PM
  3. Replies: 3
    Last Post: 09-04-2012, 01:10 AM
  4. Replies: 2
    Last Post: 04-16-2012, 09:42 AM
  5. Replies: 28
    Last Post: 02-03-2012, 05:12 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