+ Reply to Thread
Results 1 to 3 of 3

Compare two sets of data with multiple conditions

  1. #1
    Registered User
    Join Date
    06-26-2020
    Location
    Pasig, Philippines
    MS-Off Ver
    Office 365
    Posts
    2

    Compare two sets of data with multiple conditions

    Hi I am trying to compare two sets of data by having indicators if they increased, decreased, or stayed the same.

    Something like this:
    If D6 = J6 then K6.Value = 0
    If D6 > J6 then K6.Value = 1
    If D6 < J6 then K6.Value = 2

    I got it working with this:
    Please Login or Register  to view this content.
    but I got stuck, since I wanted to add a condition that if the word "NULL" or "/" appears on a cell then it would do the opposite.
    I've tried adding another IF condition to the formula but I couldn't make it work.


    Sample.PNG


    Thank you in advance!
    Last edited by AliGW; 06-29-2020 at 10:42 AM.

  2. #2
    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,481

    Re: Compare two sets of data with multiple conditions

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. As you are new, I will do it for you this time.)
    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.

  3. #3
    Registered User
    Join Date
    06-26-2020
    Location
    Pasig, Philippines
    MS-Off Ver
    Office 365
    Posts
    2

    Re: Compare two sets of data with multiple conditions

    My apologies, I will take note of this for next time. Thank you for fixing my post.

+ 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. How To Compare Two Sets Of Similar Data Sets To Find a Good Match
    By Mark123456789 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-24-2016, 01:29 AM
  2. Replies: 2
    Last Post: 11-30-2014, 08:19 PM
  3. [SOLVED] Index Match With 2 Sets of Criteria, Each with Multiple Conditions
    By MrMacro2013 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 06-23-2014, 06:29 PM
  4. [SOLVED] Compare multiple sets of columns
    By bseo927 in forum Excel General
    Replies: 7
    Last Post: 08-19-2013, 01:16 PM
  5. Replies: 2
    Last Post: 12-05-2012, 01:52 PM
  6. Update query with multiple Sets and Where conditions
    By JasonBarnes in forum Access Tables & Databases
    Replies: 3
    Last Post: 12-15-2010, 04:33 PM
  7. Compare two sets of data
    By Hollyoak08 in forum Excel General
    Replies: 3
    Last Post: 03-09-2010, 05:54 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