+ Reply to Thread
Results 1 to 23 of 23

Comparing values betwen sheets and returning values

  1. #1
    Registered User
    Join Date
    02-11-2014
    Location
    Darwin, Australia
    MS-Off Ver
    Office 365
    Posts
    34

    Comparing values betwen sheets and returning values

    Hi,
    I am getting really confused using the match address and indirect statements in a formulae.
    I have attached an excel example of what I am trying to achieve and I'm hoping someone can assist.

    I have two worksheets EUC and DV:
    Worksheet EUC contains a column of asset numbers (column 1)
    Worksheets DV contains a range of assets held by a person. The person's name is column A and the asset numbers are in columns B, C, D, E, F.

    What I am trying to do is beside each of the Asset Numbers in EUC place the name that corresponds to that number from sheet DV Column 1,
    In the DV asset register there is a total of 4 assets that a person can hold.
    If they don't hold the asset then the cell is blank otherwise it has a number in it.

    I have tried using the MATCH function but am getting an error.
    The Row 1 show the headers of what I am trying to get.
    I want to use this as a learning example.

    If anyone can help I would greatly appreciate this as currently I have to do each asset number manually using copy and find. There is a lot of assets.

    Cheers Tony
    Attached Files Attached Files
    Last edited by tonez90; 02-15-2024 at 09:44 PM. Reason: closing as solved

  2. #2
    Registered User
    Join Date
    02-11-2014
    Location
    Darwin, Australia
    MS-Off Ver
    Office 365
    Posts
    34

    Re: Comparing values betwen sheets and returning values

    Hi I've updated the example file to demonstrate that the values do exists (added an exists column)
    Cheers tony

    UPDATED THE SPREAADSHEET WITH FURTHER INFORMATION - THANKS
    I'm using Microsoft® Excel® for Microsoft 365 MSO (Version 2308 Build 16.0.16731.20496) 64-bit
    Attached Files Attached Files
    Last edited by tonez90; 02-14-2024 at 10:05 PM. Reason: Additional information supplied

  3. #3
    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,888

    Re: Comparing values betwen sheets and returning values

    Power Query Solution

    Please Login or Register  to view this content.
    Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").

    It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.

    - Follow this link to learn how to install Power Query in Excel 2010 / 2013.

    - Follow this link for an introduction to Power Query functionality.

    - Follow this link for a video which demonstrates how to use Power Query code provided.
    Attached Files Attached Files
    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

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

    Re: Comparing values betwen sheets and returning values

    Please show in the sheet of Post #2 in row 2 (column C until G) the expected results of the first item
    Last edited by HansDouwe; 02-14-2024 at 07:40 PM.

  5. #5
    Registered User
    Join Date
    02-11-2014
    Location
    Darwin, Australia
    MS-Off Ver
    Office 365
    Posts
    34

    Re: Comparing values betwen sheets and returning values

    Thank you for your return. Unfortunately my workplace doesn't allow add-ins such as power query, So am after formulae solutions.
    Cheers Tony

  6. #6
    Registered User
    Join Date
    02-11-2014
    Location
    Darwin, Australia
    MS-Off Ver
    Office 365
    Posts
    34

    Re: Comparing values betwen sheets and returning values

    I have updated the spreadsheet putting the values into the columns c to G on row 2 - to show what I am after and I have placed some of my formulae attempts to the right of the EUC worksheet.
    I have re-uploaded the amended spreadsheet in Post #2
    Cheers tony

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

    Re: Comparing values betwen sheets and returning values

    Thanks for adding the example.

    The values in D2-G2 are clear for me.

    I've a still question about match (C2)

    Is match in C2 the same as Row of Match?
    Or is match the value behind Asset in the header (sheet DV!C1)?

    Both are 2.

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

    Re: Comparing values betwen sheets and returning values

    Another question!

    Are you still using Excel 2016?

    You can check your current version of MS Office in Excel. Click file --> click account.

    The 3 most recent versions are 2019, 2021 and 365.

  9. #9
    Registered User
    Join Date
    02-11-2014
    Location
    Darwin, Australia
    MS-Off Ver
    Office 365
    Posts
    34

    Re: Comparing values betwen sheets and returning values

    I'm using Microsoft® Excel® for Microsoft 365 MSO (Version 2308 Build 16.0.16731.20496) 64-bit

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

    Re: Comparing values betwen sheets and returning values

    That is nice. Please update your profile.

  11. #11
    Registered User
    Join Date
    02-11-2014
    Location
    Darwin, Australia
    MS-Off Ver
    Office 365
    Posts
    34

    Re: Comparing values betwen sheets and returning values

    Done and thanks for the reminder to check the Profile from time to time to keep it up to date.
    Anyway hopefully someone can assist with formulae in the spreadsheet.

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

    Re: Comparing values betwen sheets and returning values

    Here is one formula for the whole table (column B to H) in one go (no copy to the right or down needed).

    Please empty all expected results and try in B2:
    Please Login or Register  to view this content.
    To better test the formula regarding the addresses, I moved the DV table 1 column and 4 rows, so that I can be sure that it works properly.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    02-11-2014
    Location
    Darwin, Australia
    MS-Off Ver
    Office 365
    Posts
    34

    Re: Comparing values betwen sheets and returning values

    Thanks for the solution,
    Unfortunately I have no idea what all this means.
    That's why I was trying to do bits at a time so that I can also learn as I am certainly no expert.
    Simple solutions will help me to better understand each of the formulae and cell referencing etc. Any chance of making it simpler?
    Cheers

  14. #14
    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,888

    Re: Comparing values betwen sheets and returning values

    Power Query is not an add in for your version of XL. It found on the Data Tab of the Ribbon and "Get and Transform Data."

    Power Query is a built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").

    It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.


    - Follow this link for an introduction to Power Query functionality.

    - Follow this link for a video which demonstrates how to use Power Query code provided.

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

    Re: Comparing values betwen sheets and returning values

    Here is a solution with separate formulas:

    Please try in B2 and copy down:
    Please Login or Register  to view this content.
    in D2 and copy down:
    Please Login or Register  to view this content.
    in E2 and copy down:
    Please Login or Register  to view this content.
    in F2 and copy down:
    Please Login or Register  to view this content.
    in G2 and copy down:
    Please Login or Register  to view this content.
    in H2 and copy down:
    Please Login or Register  to view this content.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    02-11-2014
    Location
    Darwin, Australia
    MS-Off Ver
    Office 365
    Posts
    34

    Re: Comparing values betwen sheets and returning values

    Thank you,
    That has solved my immediate problem.
    Is there also a way of doing the same thing using functions such as Match, Index, Address and Indirect?

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

    Re: Comparing values betwen sheets and returning values

    A solution with INDEX/MATCH,

    please try in G2 and copy down:
    Please Login or Register  to view this content.
    and try in H2 and copy down:
    Please Login or Register  to view this content.
    and try in B2 and copy down:
    Please Login or Register  to view this content.
    It is not a good idea (understatement) to look for a solution through the functions ADDRESS and INDIRECT.
    This is very slow and complex.

    These features should be avoided and only used when there are no other options.
    Attached Files Attached Files
    Last edited by HansDouwe; 02-15-2024 at 08:36 PM.

  18. #18
    Registered User
    Join Date
    02-11-2014
    Location
    Darwin, Australia
    MS-Off Ver
    Office 365
    Posts
    34

    Re: Comparing values betwen sheets and returning values

    Thank you very much for your help.
    All the solutions worked great and now a few of us in the office have much more understanding of these functions and methods.
    We will be continuing to learn.
    Cheers tony

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

    Re: Comparing values betwen sheets and returning values

    You are Welcome!

    Thanks for the feedback. Glad to have helped. .

    If there any questions left, don't hesistate to ask these questions here in this thread.

    If you haven't done it yet, please consider clicking the "Add Reputation" button at the foot of any of the posts of anyone who helped you reach a solution.

  20. #20
    Registered User
    Join Date
    02-11-2014
    Location
    Darwin, Australia
    MS-Off Ver
    Office 365
    Posts
    34

    Re: Comparing values betwen sheets and returning values

    Thanks Will do that.

  21. #21
    Registered User
    Join Date
    02-11-2014
    Location
    Darwin, Australia
    MS-Off Ver
    Office 365
    Posts
    34

    Re: Comparing values betwen sheets and returning values

    Hi,
    Is there a way of doing this in Excel 2016 version as I was helping another person in the office who does not have Office 365 rather office 2016 so the LET function is not available.
    So if possible (and I am asking a lot) maybe show how to do in Excel 2016 or Excel 2013 (using same example)?
    Much appreciated (in advance) Tony

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

    Re: Comparing values betwen sheets and returning values

    There is also no TOCOL in Excel 2013 and 2016.
    That is why it is easiest to convert the formulas from Post #15 for Excel 2013 and 2016.

    Solution for Excel 2007 and newer:

    Please try in B2 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    In D2 is no difference

    Please try in E2 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    in F2 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    in G2 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and in H2 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  23. #23
    Registered User
    Join Date
    02-11-2014
    Location
    Darwin, Australia
    MS-Off Ver
    Office 365
    Posts
    34

    Re: Comparing values betwen sheets and returning values

    Thank you for such a quick response. This is helping to understand Excel more and the difference between the older and newer versions.
    Cheers from tony

+ 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] Comparing 2 values and returning 3 possible answers
    By Bash66 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-20-2019, 12:43 AM
  2. Replies: 1
    Last Post: 10-01-2013, 02:41 AM
  3. Replies: 6
    Last Post: 02-22-2012, 11:26 AM
  4. Comparing columns and returning several values in to one row.
    By Chemgeorge in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-20-2010, 08:40 PM
  5. Comparing lists and returning corresponding values
    By ronoc88 in forum Excel General
    Replies: 1
    Last Post: 07-16-2010, 12:20 PM
  6. Returning different values when comparing 2 cells
    By Carl1966 in forum Excel General
    Replies: 1
    Last Post: 09-09-2008, 08:15 AM
  7. Comparing databases and returning values
    By Jonas in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-06-2006, 12:45 PM

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