+ Reply to Thread
Results 1 to 7 of 7

How to populate a table based on the cell location of given datas?

Hybrid View

  1. #1
    Registered User
    Join Date
    03-15-2013
    Location
    Beijing, China
    MS-Off Ver
    Excel 2010
    Posts
    4

    Post How to populate a table based on the cell location of given datas?

    Hi,

    I'm a new intern and my boss has given me an excel table to fill in. I know how to do it manually but given the amount of data, using excel functions would be a more appropriate and accurate method. I tried researching how to use the functions but the information overflow isn't helping. Can anyone help me solve this issue or at least guide me towards what exact functions I should be learning to use?

    I have attached here a sample of what I need to do, so please take a look at the excel file.
    I am using Excel 2010.

    So what I have is pretty much a table with information regarding sales by people categorized my Quarter 1 (Q1), Q2 and Q3. Each sales then is classified as Type 1, 2 and 3. All I need done is to place the sales on its equivalent place on the next table.

    For example, please look at the yellow number. Smith's Q1 sales of 45987 is a Type 2. Now that number is located on cell C4, how can I use a function to have that same number placed on its equivalent place on the next table in cell I4?

    Is easy to simply copy and paste, but each spreadsheet has over 700 entries...Besides my boss would like to in the future be able to update a few entries, so if using functions I believe that if a number is updated, so will it be at all equivalent cells right?

    I am really feeling lost... And would appreciate any help!

    Thanks alot
    Attached Files Attached Files

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: How to populate a table based on the cell location of given datas?

    hi EllenS, welcome to the forum. so you are actually categorizing for each row where it belongs to in the 2nd table? if i'm right, maybe this in H4:
    =SUMPRODUCT(($C$3:$E$3=LEFT(H$3,2))*($F4=RIGHT(H$3,2))*($C4:$E4))

    copy down & across. if you need to hide the 0 values, right-click -> Format Cells -> Custom:
    #;;

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    03-15-2013
    Location
    Beijing, China
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: How to populate a table based on the cell location of given datas?

    Hi benishiyo,

    Thank you for your response. I have copied and paste the =SUMPRODUCT(($C$3:$E$3=LEFT(H$3,2))*($F4=RIGHT(H$3,2))*($C4:$E4))

    into cell H4 and nothing happened. And yes the rows should be "locked" since Smith for example would have more than on sales entry.
    Pardon my ignorance, I'm just trying to understand the formula, what cell is (H$3,2) related to?

  4. #4
    Registered User
    Join Date
    03-15-2013
    Location
    Beijing, China
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: How to populate a table based on the cell location of given datas?

    Thanks for the help! I finally got the sample given to work! Thanks so much! But now that I tried applying the formula to a bit more extensive spreadsheet, it isn't working and I seem to not figure out how to fix the formula. Could you possibly help me?

    I have attached here the spreedsheet I am working with and changed names and numbers around, just for the sake of example. The concept is the same, the difference is that now besides T1, T2, and T3, there is M which belongs to the columns named Mongolia... i'm totally lost!

    Here is the formula I have adapted to but not finished because I am stuck...

    =SUMPRODUCT(($C$1:$F$1=LEFT(M$1,2))*($L2=RIGHT(M$1,2))*($C$2:$F$2))

    I had placed this formula on cell M2 and when across and down only provides me with zeros, obviously is wrong.
    I am guessing that the following are wrong...

    The number 2 in: LEFT(M$1,2) and RIGHT(M$1,2)

    Now I only manually populated the spreadsheet up to row 5, should be enought for testing I reckon.

    Let me know if I can better explain the table to you.
    Attached Files Attached Files

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,969

    Re: How to populate a table based on the cell location of given datas?

    Hi and welcome to the forum

    1st, un-check Show Formulas - Formulas/Formula Auditing.

    Im not sure why you are only pulling certain values in, but this will do it for you...
    =INDEX($C$3:$F$8,MATCH(RIGHT(I$3,2),$F$3:$F$8,0),MATCH(LEFT(I$3,2),$C$3:$F$3,0))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: How to populate a table based on the cell location of given datas?

    this might work. paste it in M2:
    =SUMPRODUCT((RIGHT($C$1:$F$1,7)=RIGHT(M$1,7))*($L2=IF(LEN($L2)=1,LEFT(M$1),LEFT(M$1,2)))*($C2:$F2))

  7. #7
    Registered User
    Join Date
    03-15-2013
    Location
    Beijing, China
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: How to populate a table based on the cell location of given datas?

    Is now working perfectly! Thank you so much!!!!!!!!!!!!


+ 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