find secific text then call macro

Posted on 2014-08-14
Last Modified: 2014-08-18
I am looking for an expert to provide me with vba code that will look for the words New or Amend or Delete in row U and if any of these are found I then need to call my module ReviewData if not found put out message 'no data found' and end sub

I am sure this is a fairly simple piece of code my I cannot figure it out

Many thanks in advance.
Question by:Jagwarman
    LVL 47

    Accepted Solution


    pls try

    Sub macro()
    Found = False
    For Each c In Range(Range("U1"), Range("U" & Cells.Rows.Count).End(xlUp))
        If c = "New" Or c = "Amend" Or c = "Delete" Then
            Found = True
            Call ReviewData
            Exit Sub
        End If
    If Not Found Then MsgBox "No data found"
    End Sub


    Author Comment

    Many thanks

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
    Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
    This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
    This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now