+ Reply to Thread
Results 1 to 10 of 10

How to display a result if all the data in a row from table1 and table2 match?

  1. #1
    Forum Contributor
    Join Date
    11-07-2020
    Location
    Paris
    MS-Off Ver
    Microsoft office 365
    Posts
    175

    How to display a result if all the data in a row from table1 and table2 match?

    Good afternoon to the community,
    I tried to use nested formulas (if, and) but it didn't work.

    I work in the file "Classeur2".

    I would like to put "BR" in the table3 in the header name "Branche" if the values in the row of table2 and the table1 are similar.

    Thank you for your help.

    Capture d??cran 2022-09-17 201256.png
    Attached Files Attached Files

  2. #2
    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: How to display a result if all the data in a row from table1 and table2 match?

    Try A11:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    copied down.
    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


  3. #3
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,421

    Re: How to display a result if all the data in a row from table1 and table2 match?

    Please try and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    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: How to display a result if all the data in a row from table1 and table2 match?

    Or, with 365,
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: How to display a result if all the data in a row from table1 and table2 match?

    with Power Query

    Branche Ex1 Ex2 Ex3 Table 1 Ex1 Ex2 Ex3 Table 2 Branche Ex1 Ex2 Ex3
    1
    18
    23
    12
    20
    20
    1
    18
    23
    14
    22
    28
    4
    4
    4
    14
    22
    28
    1
    18
    12
    1
    18
    12
    BR
    1
    18
    12
    0
    0
    0
    12
    2
    2
    0
    0
    0

  6. #6
    Forum Contributor
    Join Date
    11-07-2020
    Location
    Paris
    MS-Off Ver
    Microsoft office 365
    Posts
    175

    Re: How to display a result if all the data in a row from table1 and table2 match?

    @TM: your proposals are working.

    ---------------------------------------------------------------------------------------------

    @sandy666: What is the code if the expected result is now located in Table 1?

    PS: do you create tag name manager in excel for your table before using Power Query? or do you use power query, and click on advanced editor only and write your M-code?
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by Luu4466; 09-17-2022 at 04:45 PM.

  7. #7
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,421

    Re: How to display a result if all the data in a row from table1 and table2 match?

    And what about my proposal in Post #3?

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: How to display a result if all the data in a row from table1 and table2 match?

    Blue tables = your source
    Green table = expected result

    so you've three tables in total

    you can use formula(s) in table1 column Branche but I prefer PQ

    hm, how I do that...
    your two tables => Ctrl+T (Excel Tables) then Data -> From Table ==> and you've two source tables in Power Query window, next some magic steps and you have there Table 3 with a few manipulation and you can see result loaded into the sheet - green table

    you know how to see M-code: select Queries from the left side then select which query you want to see and then Advanced Editor

    queries.png

    for more information about Power Query: https://learn.microsoft.com/en-us/power-query/
    Last edited by sandy666; 09-17-2022 at 04:46 PM.

  9. #9
    Forum Contributor
    Join Date
    11-07-2020
    Location
    Paris
    MS-Off Ver
    Microsoft office 365
    Posts
    175

    Re: How to display a result if all the data in a row from table1 and table2 match?

    @HansDouwe,

    Update: I put the function SOMME.SI.ENS instead NB.SI.ENS (translation in french of COUNTIFS function), it didn't work for this reason.

    I put the thread as solved. Your proposal #3 is really great.

    Thank you for your help.
    Last edited by Luu4466; 09-17-2022 at 04:48 PM.

  10. #10
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: How to display a result if all the data in a row from table1 and table2 match?

    maybe this:

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


    or

    post #4
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by sandy666; 09-17-2022 at 05:24 PM.

+ 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. [SOLVED] How to write a formula Or VBA Code to get from TABLE1 To TABLE2 ?
    By rayhen in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-30-2020, 03:29 AM
  2. Copy unique databodyrange from table1 to table2
    By sniper1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-07-2020, 02:25 AM
  3. [SOLVED] Copy columns from table1 to table2
    By sniper1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-05-2020, 01:54 PM
  4. Populate and rezise table2 as table1 changes
    By Dresas in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-05-2017, 01:03 PM
  5. [SOLVED] How to convert uploaded table1 to table2?
    By tta.akmal in forum Excel General
    Replies: 5
    Last Post: 04-16-2017, 08:04 AM
  6. [SOLVED] Displaying a column from table2 based on a filter in table1
    By FVMLABOLG in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-06-2015, 04:58 PM
  7. How to copy Table2 columns in to Table1 ?
    By bsaimsc in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 10-04-2012, 07:13 AM

Tags for this Thread

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