+ Reply to Thread
Results 1 to 17 of 17

How to find result from two tables

  1. #1
    Registered User
    Join Date
    06-12-2018
    Location
    india
    MS-Off Ver
    2013
    Posts
    93

    How to find result from two tables

    Hi All,
    I have two attached problem 1. where I have to find the result from two tables., 2. attached is the sheet.
    could you please guide me how to solve it.

    Thank you
    Attached Files Attached Files

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: How to find result from two tables

    Your worksheet is confusing.

    Which 'tables' are your actual source data, which is your required outcome?
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    06-12-2018
    Location
    india
    MS-Off Ver
    2013
    Posts
    93

    Re: How to find result from two tables

    Ho Olly,
    There are two problem,

    1) I need result in F11 cell, Tables to be compare A to C column and E to F column.
    2) ) I need result in K17 - M23 cells, Tables to be compare J to L columns

  4. #4
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: How to find result from two tables

    Hi

    Use, for solve the first problem, in F11

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: How to find result from two tables

    The data in J1:L12 - do you need to perform currency conversion on these values, too?

  6. #6
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: How to find result from two tables

    To solve the second problem
    use in K17 and copy down and forward
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: How to find result from two tables

    for your first issue, you can use Power Query to merge the two tables for the expected results. Here is the Mcode for that solution.

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  8. #8
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: How to find result from two tables

    Blending data from multiple tables, to generate flexible outputs is a perfect example of when to use PowerPivot.

    In this answer, I've assumed you wish to apply currency conversion for the profit values in J:L.

    Format your three source data tables as Tables:

    Range A1:C6 = tblCountries
    Range E1:F4 = tblFX
    Range J1:L12 = tblProfits

    Use PowerQuery to prepare each table, and Load To Data Model:

    Query Countries:
    Please Login or Register  to view this content.
    Query FX:
    Please Login or Register  to view this content.
    Query Profits:
    Please Login or Register  to view this content.

    With those three tables loaded to the Data Model, create relationships:
    FX[Currency] - Countries[Currency]
    Countries[Country] - Profits[Country]

    Capture.PNG


    Add a couple of MEASURES, to give the results you want:

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Finally, use Pivot Tables to present your results.

    Note that as IND and SL do not appear in your first currency table, we can't identify which currency to use, so no value is returned in the 'Profit USD' measure, for these countries. To fix this, add those contries into the tblCountries table with their corresponding currency code, and ensure those currencies are listed in tblFX.

    Attached workbook demonstrates all the above.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    06-12-2018
    Location
    india
    MS-Off Ver
    2013
    Posts
    93

    Re: How to find result from two tables

    No Olly, in this case I don't require currency conversion. I need only output based on J1:L12.

  10. #10
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: How to find result from two tables

    Then just use a standard pivot table.
    Last edited by AliGW; 07-12-2019 at 03:41 AM.

  11. #11
    Registered User
    Join Date
    06-12-2018
    Location
    india
    MS-Off Ver
    2013
    Posts
    93

    Re: How to find result from two tables

    @José Augusto

    Thank you Jose, It works, Have a query "What exact ,1 does in If error function end"

    =VLOOKUP($E11,$A$2:$C$6,3,FALSE)*IFERROR(VLOOKUP(VLOOKUP($E11,$A$2:$C$6,2,FALSE),$E$2:$F$5,2,FALSE),1)

  12. #12
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: How to find result from two tables

    Hi @Merrysa

    That value 1 is the conversion from USD to USD., i.e. to avoid IFERROR use
    E5="USD"
    F5=1

  13. #13
    Registered User
    Join Date
    06-12-2018
    Location
    india
    MS-Off Ver
    2013
    Posts
    93

    Re: How to find result from two tables

    Got it, thanks a lot

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,931

    Re: How to find result from two tables

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  15. #15
    Registered User
    Join Date
    06-12-2018
    Location
    india
    MS-Off Ver
    2013
    Posts
    93

    Re: How to find result from two tables

    @Olly
    Very impressive, actually I never worked on PowerPivot , Understanding your method

  16. #16
    Registered User
    Join Date
    06-12-2018
    Location
    india
    MS-Off Ver
    2013
    Posts
    93

    Re: How to find result from two tables

    Very impressive, actually I never worked on PowerPivot , Understanding your method
    Last edited by AliGW; 07-12-2019 at 03:40 AM. Reason: Please don't quote unnecessarily!

  17. #17
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,931

    Re: How to find result from two tables

    Administrative Note:

    Please don't quote whole posts, especially when you are responding to the one immediately preceding your own - it's just clutter. It's OK to quote if you are responding to a post out of sequence, but limit quoted content to a few relevant lines that makes clear to whom and what you are responding. Thanks!

    For normal conversational replies, try using the QUICK REPLY box below.

+ 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. Link Two Pivot Tables then Return a Row Result
    By ioswoody in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 11-09-2017, 11:07 PM
  2. [SOLVED] VBA to combine data from two different tables into a result table
    By Laurelb in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-06-2015, 09:23 AM
  3. How Compare two tables, and result ( only the differences )
    By Chrystopher in forum Excel General
    Replies: 4
    Last Post: 02-20-2015, 10:20 AM
  4. [SOLVED] access connection to 2 tables to find a common name in both tables
    By Megatronixs in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-19-2014, 08:48 AM
  5. [SOLVED] Need Dlookup from one lookup value get result through 3 tables to different textbox
    By johnodys in forum Access Tables & Databases
    Replies: 3
    Last Post: 06-16-2014, 02:19 AM
  6. data tables different wrong result every time
    By tsatsos007 in forum Excel General
    Replies: 1
    Last Post: 11-30-2013, 07:37 AM
  7. Replies: 6
    Last Post: 02-05-2012, 05:27 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