+ Reply to Thread
Results 1 to 5 of 5

Excel formula - need to compare values from one sheet to another sheet

  1. #1
    Registered User
    Join Date
    05-03-2022
    Location
    United States
    MS-Off Ver
    O365
    Posts
    4

    Excel formula - need to compare values from one sheet to another sheet

    I need a formula that will take a list of values from one sheet, and compare them to a different sheet. Sheet 1 has column A with amounts and then column B with type of charge. Sheet 2 has the type of charges going across in a row - travel, training, meals, etc, and then amounts going down in each column. I need a formula to verify that sheet 1 has all of the information from sheet 2. I would like to do this comparison in a different column and get a True or False answer back.

    Attached is a sample worksheet, with the two sheets.

    Any help would be much appreciated! Thank you!
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by dfuhrman8; 05-04-2022 at 10:52 AM. Reason: correction to post

  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,420

    Re: Need some excel vba help

    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file.
    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
    Registered User
    Join Date
    05-03-2022
    Location
    United States
    MS-Off Ver
    O365
    Posts
    4

    Re: Need some excel vba help

    I have attached a sample. The only thing missing from my example is for Sheet 1, I do not have the second column showing what type of charges the amounts for column A.

  4. #4
    Registered User
    Join Date
    05-03-2022
    Location
    United States
    MS-Off Ver
    O365
    Posts
    4

    Re: Need some excel vba help

    Attached is the revised worksheet.
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Excel formula - need to compare values from one sheet to another sheet

    Perhaps something like the following will help.
    1. Convert the data range on Sheet2 into an Excel table
    2. Use the following Power Query Advanced Editor code to put the table into column form as modeled in columns E:F on Sheet1:
    Please Login or Register  to view this content.
    3. Use the following to compare the values in Sheet1 column A to the values in the newly produced table: =COUNTIFS(A$1:A$118,A1,B$1:B$118,B1)=COUNTIFS(Table1_2[Value],A1,Table1_2[Attribute],B1)
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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