+ Reply to Thread
Results 1 to 13 of 13

auto-transfer data

  1. #1
    Registered User
    Join Date
    04-04-2009
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    8

    auto-transfer data

    Would somebody be able to help me on the following problem ? I've seen some companies employing external database generators to do this, but I believe excel may have something built in.

    PROBLEM :
    There’s one “master table”. Two columns in master table are titled “Name-1” and “Name-2”, and all columns in front of it carry “Properties” corresponding to these names.
    In a “second” table, when we choose/type the Name-1 and Name-2, corresponding properties should automatically be picked up from the master table. Is that possible ?

    The two tables are attached. Thanks.
    Attached Files Attached Files
    Last edited by rajat20001; 04-22-2009 at 10:47 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: auto-transfer data

    Put this formula in G5 and copy across:

    =INDEX('[Master Table.xls]air cooler'!D:D,MATCH($E5,'[Master Table.xls]air cooler'!$B:$B,0))

    Unless I'm mistaken you can use that in F5, too. Copy to the left, if so.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    04-04-2009
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    8

    Smile Re: auto-transfer data

    Thanks a lot JB,
    It works. Could you be kind to please explain this string, so that I can understand its limitations and expanded applicability ?

    In particular, it seems that the MATCH is finding out data corresponding to only $E5 and not $E6. Is it correct ?

    Thanks again, I'll read about the INDEX and MATCH functions to educate myself and then will ask you today itself if some more of your excellent help is required.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: auto-transfer data

    The MATCH() formula is looking for the value in E5 in the column B on the other sheet. The answer returned is a row number. That row number is passed back to the INDEX() formula.

    The INDEX() formula is just a list of all values in column D, it takes the row number returned from the MATCH() and gives you the INDEX() value from the same position.

  5. #5
    Registered User
    Join Date
    04-04-2009
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: auto-transfer data

    Thanks a lot JB. Your input has been very helpful.
    Best regards.

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: auto-transfer data

    If that takes care of your need, be sure to EDIT your original post (Go Advanced) and mark the PREFIX box [SOLVED]

  7. #7
    Registered User
    Join Date
    04-04-2009
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: auto-transfer data

    Hi JB,
    Excuse me for bothering you again.

    Could you please help me with its slight variant also, wherein WE HAVE TO DO IT WITHIN THE SAME FILE, BUTT DIFFERENT SHEETS. So, the problem becomes :
    There’s one “master SHEET”. Two columns in master SHEET are titled “Name-1” and “Name-2”, and all columns in front of it carry “Properties” corresponding to these names.
    In a “second” SHEET, when we choose/type the Name-1 and Name-2, corresponding properties should automatically be picked up from the master SHEET.

    Thanks a lot in anticipation.

  8. #8
    Forum Contributor
    Join Date
    04-18-2009
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2016
    Posts
    269

    Thumbs up Re: auto-transfer data

    Hi Rajat,

    I am new to Excel Forum. But, I thought I could help.

    Consider the name of the first sheet to be 'Master Sheet'.

    Now, in the second sheet, you can put either of the two formulas in G5 and you can copy it across the entire range:

    Option 1 ---> =INDEX('Master Sheet'!D:D,MATCH($E5,'Master Sheet'!$B:$B,0))

    Option 2 ---> =VLOOKUP($E5,'Master Sheet'!$B$5:$V$20,COLUMN(F$1)-3,0)


    The first option is a minor modification of Mr. JB's solution.

    Hope you find the information useful .

    --Karan--

  9. #9
    Registered User
    Join Date
    04-04-2009
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: auto-transfer data

    Thanks Karan, it works. thanks.

    Karan , JB,
    Would it be possible to modify the formula in G5 such that the MATCH() formula looks for the value in E5 aswell as F5 (in the column B and C on the other sheet) before returning the answer as row number for INDEX to use it ?

  10. #10
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: auto-transfer data

    To avoid nasty arrays (performance killing formulas), it would be best to add a column to your MasterSheet that joins the two value in =B5&C5 into a single, uniquely searchable value.

    It doesn't have to be IN the original chart, it can be way off to the right in a column that's even hidden, like column AA, but it needs to be there.

    Put in AA5 the formula:
    =IF(B5="","",B5&C5)
    ...and copy down as far as you'd like this to work, then hide the column if you wish.

    Then put this in G5 and copy across and down:
    =INDEX(MasterSheet!D:D,MATCH($E5&$F5,MasterSheet!$AA:$AA,0))

    If you don't want all those zeros showing, click on TOOLS > OPTIONS > VIEW > [ ] Zero Values and uncheck that option.
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    04-18-2009
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2016
    Posts
    269

    Thumbs up Re: auto-transfer data

    Hi Rajat,

    I have written a macro for you. It is in the attached file.

    By simply entering the values in the 'Name-1' and 'Name-2' columns in the second table, you will automatically get the values in the adjoining columns if a match is found in the 'Master Sheet'.

    Make sure you enable macros when you open the file.

    Also, be sure that the Properties columns in both the sheets are in the same order.

    The macro is written in the Worksheet_change module of the sheet 'Second Sheet'. If you want the macro to run on your file, just copy it from here and paste it in the 'Second Sheet' code of your file. You can even customize it by modifying the range and other things. If you have any more doubts, do write back .

    --Karan--
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    04-04-2009
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: auto-transfer data

    Many thanks again Karan and JB.
    Your help has been truely fantastic, on the spot, and most appreciated.

    Makes me wonder how do these intricate aspects of Excel come so easily to you ? Is it some formal training, plus immense personal interest, or both ?

    I am an engineer and see normal fellow engineers being totally ignorant of the strengths of excel. Our world would be much easier if we were as familiar in excel.

    So, the next questions are :
    1. can I take this formal education in Excel somewhere in India ?
    2. Is there a knowledgeable guy like yourselves, who comes over and educate these excel intracacies to our team in our premisis in Delhi ?
    3. Could I have your direct email ID ?

  13. #13
    Forum Contributor
    Join Date
    04-18-2009
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2016
    Posts
    269

    Smile Re: auto-transfer data

    Hi Rajat,

    I have sent you me email id in a personal message.

    --Karan--

+ 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