Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Searching for records that end in a specific character

Hi;

I have a two sheet workbook. One sheet allows for the entry of search
criteria in the upper half and the search results in the lower half. The
other sheet contains the records that are searched.

I have a situation where in one field called Location, there are similar
values such as Rack 1, Rack 11, Rack 12, etc. If I want to search for rows
that only have Rack 1 in the Location and I put in Rack 1 into my search
field, rows that have Rack 1, Rack 11, etc. come up as hits. Is there a
wilcard or other character that allows me search for a speciific value like
"Rack 1" ? By the way I tried putting Rack 1 in quotes and itr did not help.
Any assistance is greatly appreciated.
--
JJFJR
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 227
Default Searching for records that end in a specific character

You could compare the length of the text in the searched fields against
your search criterion. "Rack 1" is six characters in length. "Rack
16" is seven characters. So if the length of your searched text
doesn't equal the length of the text you're searching for, the data is
not what you need.

Sorry, no time for specifics.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Searching for records that end in a specific character

Hi JJFJR,

Try:

="=Rack1"


---
Regards,
Norman


"jjfjr" wrote in message
...
Hi;

I have a two sheet workbook. One sheet allows for the entry of search
criteria in the upper half and the search results in the lower half. The
other sheet contains the records that are searched.

I have a situation where in one field called Location, there are similar
values such as Rack 1, Rack 11, Rack 12, etc. If I want to search for rows
that only have Rack 1 in the Location and I put in Rack 1 into my search
field, rows that have Rack 1, Rack 11, etc. come up as hits. Is there a
wilcard or other character that allows me search for a speciific value
like
"Rack 1" ? By the way I tried putting Rack 1 in quotes and itr did not
help.
Any assistance is greatly appreciated.
--
JJFJR



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Searching for records that end in a specific character

Hi,

What are you using to search through your code? VBA or Excel Functions?
Using VLookup there's a number you can include as a parameter that defines
whether to use wildcard or not I think. Look at the VLookup (or HLookup as
the case may be) in Excel Help for more info.

Hope this helps.

--
Kurt Farrar
..NET Developer & Computer Enthusiast



"jjfjr" wrote:

Hi;

I have a two sheet workbook. One sheet allows for the entry of search
criteria in the upper half and the search results in the lower half. The
other sheet contains the records that are searched.

I have a situation where in one field called Location, there are similar
values such as Rack 1, Rack 11, Rack 12, etc. If I want to search for rows
that only have Rack 1 in the Location and I put in Rack 1 into my search
field, rows that have Rack 1, Rack 11, etc. come up as hits. Is there a
wilcard or other character that allows me search for a speciific value like
"Rack 1" ? By the way I tried putting Rack 1 in quotes and itr did not help.
Any assistance is greatly appreciated.
--
JJFJR

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Searching for records that end in a specific character

Kurt;

Thanks for the response. I'm using the following VBA code attached to a
search button:

Worksheets("Data").Range(DataRng).AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Worksheets("Results").Range(CritRng ),
CopyToRange:=Worksheets("Results").Range(ResultsRn g), _
Unique:=True

I'm entering text to search on in a cell.
--
JJFJR


"Kurt Farrar" wrote:

Hi,

What are you using to search through your code? VBA or Excel Functions?
Using VLookup there's a number you can include as a parameter that defines
whether to use wildcard or not I think. Look at the VLookup (or HLookup as
the case may be) in Excel Help for more info.

Hope this helps.

--
Kurt Farrar
.NET Developer & Computer Enthusiast



"jjfjr" wrote:

Hi;

I have a two sheet workbook. One sheet allows for the entry of search
criteria in the upper half and the search results in the lower half. The
other sheet contains the records that are searched.

I have a situation where in one field called Location, there are similar
values such as Rack 1, Rack 11, Rack 12, etc. If I want to search for rows
that only have Rack 1 in the Location and I put in Rack 1 into my search
field, rows that have Rack 1, Rack 11, etc. come up as hits. Is there a
wilcard or other character that allows me search for a speciific value like
"Rack 1" ? By the way I tried putting Rack 1 in quotes and itr did not help.
Any assistance is greatly appreciated.
--
JJFJR



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Searching for records that end in a specific character

Norman;

Thanks for the reponse. I tried your I idea and it got no hits. My search is
triggered by some VBA code attached to my search button as follows:

Worksheets("Data").Range(DataRng).AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Worksheets("Results").Range(CritRng ),
CopyToRange:=Worksheets("Results").Range(ResultsRn g), _
Unique:=True

I entered "=Rack 1" into my search criteria area and no hits came up after
hitting the search button. Any other ideas are appreciated.
--
JJFJR


"Norman Jones" wrote:

Hi JJFJR,

Try:

="=Rack1"


---
Regards,
Norman


"jjfjr" wrote in message
...
Hi;

I have a two sheet workbook. One sheet allows for the entry of search
criteria in the upper half and the search results in the lower half. The
other sheet contains the records that are searched.

I have a situation where in one field called Location, there are similar
values such as Rack 1, Rack 11, Rack 12, etc. If I want to search for rows
that only have Rack 1 in the Location and I put in Rack 1 into my search
field, rows that have Rack 1, Rack 11, etc. come up as hits. Is there a
wilcard or other character that allows me search for a speciific value
like
"Rack 1" ? By the way I tried putting Rack 1 in quotes and itr did not
help.
Any assistance is greatly appreciated.
--
JJFJR




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Searching for records that end in a specific character

Hi JJFJR,

I entered "=Rack 1" into my search criteria area and no hits came up after
hitting the search button. Any other ideas are appreciated.


My suggestion was:

="=Rack1"

Note the initial =

---
Regards,
Norman



"jjfjr" wrote in message
...
Norman;

Thanks for the reponse. I tried your I idea and it got no hits. My search
is
triggered by some VBA code attached to my search button as follows:

Worksheets("Data").Range(DataRng).AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Worksheets("Results").Range(CritRng ),
CopyToRange:=Worksheets("Results").Range(ResultsRn g), _
Unique:=True

I entered "=Rack 1" into my search criteria area and no hits came up after
hitting the search button. Any other ideas are appreciated.
--
JJFJR


"Norman Jones" wrote:

Hi JJFJR,

Try:

="=Rack1"


---
Regards,
Norman


"jjfjr" wrote in message
...
Hi;

I have a two sheet workbook. One sheet allows for the entry of search
criteria in the upper half and the search results in the lower half.
The
other sheet contains the records that are searched.

I have a situation where in one field called Location, there are
similar
values such as Rack 1, Rack 11, Rack 12, etc. If I want to search for
rows
that only have Rack 1 in the Location and I put in Rack 1 into my
search
field, rows that have Rack 1, Rack 11, etc. come up as hits. Is there a
wilcard or other character that allows me search for a speciific value
like
"Rack 1" ? By the way I tried putting Rack 1 in quotes and itr did not
help.
Any assistance is greatly appreciated.
--
JJFJR






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
Searching for records with multiple criteria Jeff Excel Worksheet Functions 7 December 11th 08 10:07 PM
Searching Latest Records [email protected] Excel Worksheet Functions 1 June 25th 08 09:44 PM
Searching for particular records [email protected] Excel Discussion (Misc queries) 5 March 6th 07 10:51 PM
Searching for a new line character. Michael Excel Discussion (Misc queries) 3 September 20th 05 06:12 PM
Searching a cell for a certain character. Matt Excel Worksheet Functions 3 January 3rd 05 09:14 PM


All times are GMT +1. The time now is 09:02 AM.

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"