To find only in column A

Adrac

Active Member
Joined
Feb 13, 2014
Messages
280
Office Version
  1. 365
Platform
  1. Windows
Hello Gang,

I haea psrt o a script that looks for word in the whole sheet. Ca anyone suggest how I can look oly n column A:A

Code:
Selection.Find(What:="Queue Group:",after:=ActiveCell,LookIn:=xlalues,_
LokAt:=xlPart, SearchOrder:=lByRows, SearchDirection:=xlNext,_
MatchCase:=False).Activate

Adrac
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Try

Code:
Dim found As Range
Set found = Columns("A").Find(What:="Queue Group:", LookIn:=xlValues,LookAt:=xlPart)
If Not found Is Nothing Then found.Select

Note: there were several typos in your code.
 
Upvote 0
Great thank you, I had to type out the code as my C&P wasn't working for some reason but its correct in the script lol

Tanks guys I shall try this out and let you know

Adrac
 
Upvote 0
Andrew - I noticed the script was selecting A:A but found row 1 was merged so it was checking all the sheet. Corrected this now in the script and all works fine,

Thanks both of you

Adrac
 
Upvote 0
And that also proves you don't have to work with merged cells.

You get in trouble with it sooner or later, (in you case sooner).

Nice you could solve this on your own.
 
Upvote 0

Forum statistics

Threads
1,203,461
Messages
6,055,559
Members
444,798
Latest member
PAO1609

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
Back
Top