Learn how to a build a cloud-first strategyRegister Now


find secific text then call macro

Posted on 2014-08-14
Medium Priority
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 54

Accepted Solution

Rgonzo1971 earned 2000 total points
ID: 40262462

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

ID: 40262501
Many thanks

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
Microsoft's Excel has many features that most people will never need nor take advantage of.  Conditional formatting is one feature that you may find a necessity once you start using it.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

810 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