+ Reply to Thread
Results 1 to 9 of 9

Auto Fill Columns B, C, D based on Column data of A. Master List in a 2nd Sheet

  1. #1
    Registered User
    Join Date
    12-03-2010
    Location
    Melbourne
    MS-Off Ver
    Excel 2007
    Posts
    2

    Auto Fill Columns B, C, D based on Column data of A. Master List in a 2nd Sheet

    Does any one know how I can get data to autopopulate in a table based on what I select in the first row. i.,e

    lets say I have the following table in excel on sheet 1

    No Model No Description Price
    1 MPC2600 Black Toner 12,000 $10
    2 MPC3000 Magenta Toner 6,000 $20
    3 MPC4000 Black Toner 2,000 $15
    4 MFD3400 Yellow Toner $69
    5 MFD8000 Black Toner $40

    and on sheet 2 I have just this

    No Model No Description Price

    Now lets says, I want to enter for example MPC4000 under the colume title Model No on sheet 2. How can I get the cell to recqnise the Model No and autopopulate the fields of Description and Price from alongside it from those next to the same model number in sheet A. I would want to do this many times building a list of data to give to a customer when they ask me for toner prices on X, Y, Z models instead of having to cut and paste it each time.

    I am sure some form of filter is used on each row but I dont know how to do it. As I am too slow at quoting at work my job is in immediate danger! Any help would be great!

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Auto Fill Columns B, C, D based on Column data of A. Master List in a 2nd Sheet

    You probably need to look into Vlookup()

    With MPC4000 in cell A1 on Sheet2, use in B1 for Description

    =vlookup(A1,Sheet1!A1:C100,2,false)

    and in C1 for price

    =vlookup(A1,Sheet1!A1:C100,3,false)

    if that does not help....

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,434

    Re: Auto Fill Columns B, C, D based on Column data of A. Master List in a 2nd Sheet

    Just to take that a step further, if you want to "pre-populate" the formula down the sheet, you could use:

    use in B1 for Description

    =If($A1="","",vlookup($A1,Sheet1!$A$1:$C$100,2,false))

    and in C1 for price

    =If($A1="","",vlookup($A1,Sheet1!$A$1:$C$100,3,false))

    Select the two cells with formulae and "drag" down as far as you need to go.

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Valued Forum Contributor mahju's Avatar
    Join Date
    11-27-2010
    Location
    Pakistan, Faisalabad
    MS-Off Ver
    Excel 2010 plus
    Posts
    730

    Re: Auto Fill Columns B, C, D based on Column data of A. Master List in a 2nd Sheet

    I have used vlookup and ISNA function in conditional formatting to solve the problem

    See attached sheet
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor mahju's Avatar
    Join Date
    11-27-2010
    Location
    Pakistan, Faisalabad
    MS-Off Ver
    Excel 2010 plus
    Posts
    730

    Re: Auto Fill Columns B, C, D based on Column data of A. Master List in a 2nd Sheet

    You can check
    click any cell in shhet2 that has VlookUp function e.g. C4 and go
    Format -- > Conditional Formatting & see the formula and formatting there

    Regards

  6. #6
    Valued Forum Contributor mahju's Avatar
    Join Date
    11-27-2010
    Location
    Pakistan, Faisalabad
    MS-Off Ver
    Excel 2010 plus
    Posts
    730

    Re: Auto Fill Columns B, C, D based on Column data of A. Master List in a 2nd Sheet

    One thing i should mentioned for using is the cells having formula should be locked, so that

    they may not be deleted accidentally

    Thanks

    Regards

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,434

    Re: Auto Fill Columns B, C, D based on Column data of A. Master List in a 2nd Sheet

    I'd start out with something like this for the basic mechanics of the input and lookup.

    The Input Sheet could be be modified to include the Customer's name and Invoice/Delivery Address details, etc.

    I've added Named Ranges for the PartNumber for the Data Validation drop down and PriceList for the VLOOKUP.


    Regards
    Attached Files Attached Files

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Auto Fill Columns B, C, D based on Column data of A. Master List in a 2nd Sheet

    @mahju fyi
    =IF(ISNA(C13),TRUE,FALSE)
    In cf is not necessary just
    =ISNA(C13)
    will do
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  9. #9
    Valued Forum Contributor mahju's Avatar
    Join Date
    11-27-2010
    Location
    Pakistan, Faisalabad
    MS-Off Ver
    Excel 2010 plus
    Posts
    730

    Re: Auto Fill Columns B, C, D based on Column data of A. Master List in a 2nd Sheet

    Good
    Thank you

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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