Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
All right i have a problem.
Say I have a column with cells of: D B,DA F,AD D,AD Currently the code below finds all the values of anything with the letter "D" in it. I only want it to find values where it is just "D". so finding cell with D,AD is fine because it has D in it. But finding cell with F,AD is not fine. Which it currently finds because it has a "D" in the part of "AD" Any ideas? I was thinking about parse each cell but i think that would take too long and be lengthy. Set rngFound = rngToSearch.Find(What:=("D"), _ LookIn:=xlValues, _ LookAt:=xlPart, _ MatchCase:=True) Any Ideas? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Change xlPart to xlWhole.
Hope this helps, Hutch "RigasMinho" wrote: All right i have a problem. Say I have a column with cells of: D B,DA F,AD D,AD Currently the code below finds all the values of anything with the letter "D" in it. I only want it to find values where it is just "D". so finding cell with D,AD is fine because it has D in it. But finding cell with F,AD is not fine. Which it currently finds because it has a "D" in the part of "AD" Any ideas? I was thinking about parse each cell but i think that would take too long and be lengthy. Set rngFound = rngToSearch.Find(What:=("D"), _ LookIn:=xlValues, _ LookAt:=xlPart, _ MatchCase:=True) Any Ideas? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
#VALUE about function Find | Excel Worksheet Functions | |||
Find function | Excel Worksheet Functions | |||
Find Function | Excel Worksheet Functions | |||
Find Function via VB | Excel Programming | |||
backwards find function to find character in a string of text | Excel Programming |