ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Searching for records that end in a specific character (https://www.excelbanter.com/excel-programming/350574-searching-records-end-specific-character.html)

jjfjr

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

Mark Lincoln

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.


Norman Jones

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




Kurt Farrar

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


jjfjr

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


jjfjr

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





Norman Jones

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








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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com