Searching for a word

KORKIS2

Board Regular
Joined
Jun 5, 2015
Messages
143
I search down column A for the phrase " Second Unit". Then I have a pop up box that displays the row in which the search has returned. For some reason this is all the sudden now working. I can't figure out why?
With this error...

1004
Application defined or object defined error.



PHP:
Set Found = Columns("A").Find(What:="Second Unit", After:=[A1], LookIn:=xlFormulas, _LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _MatchCase:=False, SearchFormat:=False)If Found Is Nothing ThensMessage = "No Match Found for ""Second Unit""" & vbCrElsesMessage = """Second Unit"" found in cell " & Found.Address & " Row: " & Found.Row & vbCru = Found.Row End If  MsgBox "Current value is " & u
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

sijpie

Well-known Member
Joined
Nov 1, 2008
Messages
4,186
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Is this all on one line in your macro, or is it just how it came out here? Can you post it again please?
 
Upvote 0

Forum statistics

Threads
1,195,581
Messages
6,010,574
Members
441,557
Latest member
Jbest23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top