Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default find item in coloumn

Hi all

I want to find a whole string in coulumn b

how do I do that?

Set c = ws.Cells.Find(ename, Null, Null, xlWhole) '
xlByColumns
Set c = ws.Cells.Find(ename, "B3", Null, xlWhole) '
xlByColumns

these fails totally

The help does not explain anything

Sonnich
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,522
Default find item in coloumn

The macro recorder can be your friend
Sub Macro7()
'
' Macro7 Macro
' Macro recorded 3/23/2010 by Donald B. Guillett
'

'
Columns("B:B").Select
Selection.find(What:="Person2", After:=ActiveCell, LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
End Sub

cleaned up
Sub Macro7a()
set c= Columns("B").find("Person2", LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False)
if not c is nothing then msgbox "found it at " & c.row

End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"jodleren" wrote in message
...
Hi all

I want to find a whole string in coulumn b

how do I do that?

Set c = ws.Cells.Find(ename, Null, Null, xlWhole) '
xlByColumns
Set c = ws.Cells.Find(ename, "B3", Null, xlWhole) '
xlByColumns

these fails totally

The help does not explain anything

Sonnich


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find Last Item Entered in Row Ron Excel Worksheet Functions 4 February 10th 10 01:54 AM
Sort one coloumn according to another coloumn on another worksheet Sunir M S[_2_] Excel Worksheet Functions 0 December 6th 09 09:59 AM
To find rate of each item from item.xls and to copy price.xls pol Excel Discussion (Misc queries) 7 July 16th 09 12:49 AM
Find rows with a common item and find or highlight difference jonnybrovo815 Excel Programming 2 February 27th 08 12:56 AM
find previous row for an item HedwigVB Excel Worksheet Functions 2 March 25th 05 04:49 AM


All times are GMT +1. The time now is 06:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"