Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
find a string in one cells
I want to find a special string like "Total" in some cells.
I tried to use find which is a methed of range, but it works only with value and match which only works in the spreadsheet, but not VBA coding. Are there any function that can find a sub string of the cell? Your help is great appreciated, |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
find a string in one cells
From the help file for the Find method...
"expression.Find(What, After, LookIn, LookAt, SearchOrder, SearchDirection, MatchCase, MatchByte)" For the "LookAt" argument specify "xlPart" -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware (Excel Add-ins / Excel Programming) "Souris" wrote in message I want to find a special string like "Total" in some cells. I tried to use find which is a methed of range, but it works only with value and match which only works in the spreadsheet, but not VBA coding. Are there any function that can find a sub string of the cell? Your help is great appreciated, |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
find a string in one cells
Sheets("sheet1").Cells(7, 1).Find(MyString, , , xlPart)
I got type mismatch using abover code, Thanks again, "Jim Cone" wrote: From the help file for the Find method... "expression.Find(What, After, LookIn, LookAt, SearchOrder, SearchDirection, MatchCase, MatchByte)" For the "LookAt" argument specify "xlPart" -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware (Excel Add-ins / Excel Programming) "Souris" wrote in message I want to find a special string like "Total" in some cells. I tried to use find which is a methed of range, but it works only with value and match which only works in the spreadsheet, but not VBA coding. Are there any function that can find a sub string of the cell? Your help is great appreciated, |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
find a string in one cells
Hi,
Instr( cells(1,1).value, "searchstring" ) rgds, Lazzzx "Souris" skrev i meddelelsen ... I want to find a special string like "Total" in some cells. I tried to use find which is a methed of range, but it works only with value and match which only works in the spreadsheet, but not VBA coding. Are there any function that can find a sub string of the cell? Your help is great appreciated, |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
find a string in one cells
Dim rngFound As Range Set rngFound = Sheets("sheet1").Cells.Find(MyString, , , xlPart) -or- If you know the cell to look in use the code that Lazzzx provided. -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware (Excel Add-ins - check out "Find and List") "Souris" wrote in message Sheets("sheet1").Cells(7, 1).Find(MyString, , , xlPart) I got type mismatch using abover code, Thanks again, "Jim Cone" wrote: From the help file for the Find method... "expression.Find(What, After, LookIn, LookAt, SearchOrder, SearchDirection, MatchCase, MatchByte)" For the "LookAt" argument specify "xlPart" -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware (Excel Add-ins / Excel Programming) "Souris" wrote in message I want to find a special string like "Total" in some cells. I tried to use find which is a methed of range, but it works only with value and match which only works in the spreadsheet, but not VBA coding. Are there any function that can find a sub string of the cell? Your help is great appreciated, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find specific string in range of cells | Excel Programming | |||
Find String in another string - only between spaces | Excel Worksheet Functions | |||
Find Many String options in ONE String | Excel Worksheet Functions | |||
Need to find the right-most cell value in a string of cells | Excel Worksheet Functions | |||
backwards find function to find character in a string of text | Excel Programming |