+ Reply to Thread
Results 1 to 10 of 10

Notification by a macro if data doesn't matches

  1. #1
    Forum Contributor
    Join Date
    06-09-2014
    MS-Off Ver
    Microst Office 365 Plus
    Posts
    143

    Notification by a macro if data doesn't matches

    Hi,
    I have a file name Book1.xlsx that has 4-8 sheets & I am trying & looking for a macro that will do the process as mentioned below,

    It will match the column B data of sheet1 with column B of sheet 4 and if matches then nothing but if it doesn't matches then a msgbox should appear that data doesn't matches.

    I am looking for vba macro to do the same
    I have another file(book4.xlsm) in which i will put this macro & it is located in a different place
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    578

    Re: Notification by a macro if data doesn't matches

    Sorry if I'm not helping here.

    I just wonder what do you mean with this sentence :
    In this Example: B5 & B6 doesn't matches with sheet 4 column B , So a msg will pop up stating that it doesn't matches
    Did you mean that :
    if the value in any row of column B Sheet1 is not found in column B Sheet4 ?

    For example in Sheet1
    ISABELLA 635

    The number "635" is not found in column B Sheet4.
    So you want a message box with text something like this "There is no code 635 in column B Sheet4"

  3. #3
    Forum Contributor
    Join Date
    06-09-2014
    MS-Off Ver
    Microst Office 365 Plus
    Posts
    143

    Re: Notification by a macro if data doesn't matches

    Yes u r right
    But i dont want with text , I only want msg that data doesn't match

  4. #4
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    578

    Re: Notification by a macro if data doesn't matches

    Quote Originally Posted by MoldyBread View Post
    Yes u r right
    But i dont want with text , I only want msg that data doesn't match
    On what condition the message box will appear ?
    A. Each time there is a value in any row in column B Sheet1 is not found in column B Sheet4
    B. One time only, so soon after the code pop the message box to the user for the first time because
    it didn't find a value (in any row in column B Sheet1) in column B Sheet4, the macro finish/stop.


    If it's A,
    the message box will appear again when it finds out that
    the code number 849 (MIA) in columnB sheet1 is not exist in column B sheet4.

    If it's B,
    The code stop/finish after popping a message box because code number 635 (ISABELLA) is not exist in column B Sheet4.
    So here the code doesn't bother to check the next row value of column B Sheet1 whether it also exist or not in column B Sheet4.

  5. #5
    Forum Contributor
    Join Date
    06-09-2014
    MS-Off Ver
    Microst Office 365 Plus
    Posts
    143

    Re: Notification by a macro if data doesn't matches

    Yes It's B

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    8,306

    Re: Notification by a macro if data doesn't matches

    Something like this...
    Please Login or Register  to view this content.
    Last edited by sintek; 05-20-2020 at 12:52 PM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere.....
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember......Mark Thread as Solved.
    Excel Forum Rocks!!!

  7. #7
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    578

    Re: Notification by a macro if data doesn't matches

    Thank you, sintek.
    I learn again from you .

  8. #8
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    8,306

    Re: Notification by a macro if data doesn't matches

    Could be simpler but not really sure what is required...

  9. #9
    Forum Contributor
    Join Date
    06-09-2014
    MS-Off Ver
    Microst Office 365 Plus
    Posts
    143

    Re: Notification by a macro if data doesn't matches

    Please Login or Register  to view this content.


    Thnx Alot Problem Solved Sintek Sir & karmapala

  10. #10
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    8,306

    Re: Notification by a macro if data doesn't matches

    All good...

+ 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] delete entire row if doesn't matches
    By MoldyBread in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 05-11-2020, 08:29 AM
  2. [SOLVED] Need help with macro to get all corresponding row data when matches to adjacent cell value
    By toofani in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 03-24-2016, 06:17 AM
  3. Replies: 4
    Last Post: 05-10-2015, 02:11 PM
  4. Replies: 2
    Last Post: 09-15-2014, 09:58 AM
  5. Searching for matches from 2 columns and copying data from matches
    By Jesper Daelin in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-01-2014, 10:49 AM
  6. [SOLVED] Macro that Matches up two different columns of data
    By glide2131 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-25-2014, 08:06 PM
  7. [SOLVED] if one of the 3 strings is missing sinde the last 6 matches then i want notification
    By thealian in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-24-2012, 03:43 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