ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Search and select a cell when pressing enter (https://www.excelbanter.com/excel-programming/395878-search-select-cell-when-pressing-enter.html)

bartman1980

Search and select a cell when pressing enter
 
I want to make a some kind of CTRL-F field in my sheet.

If the text (or a part of the text) in cell F1 is found in row A then
select the cell with the text where it was found.
And when I'm in the cell F1, I prefer just to press 'enter' instead of
clicking on a button.

Does somebody have an example?


Don Guillett

Search and select a cell when pressing enter
 

right click the sheet tabview codeleft window select worksheetright
window select worksheet_changeput your FIND code there

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"bartman1980" wrote in message
ups.com...
I want to make a some kind of CTRL-F field in my sheet.

If the text (or a part of the text) in cell F1 is found in row A then
select the cell with the text where it was found.
And when I'm in the cell F1, I prefer just to press 'enter' instead of
clicking on a button.

Does somebody have an example?



bartman1980

Search and select a cell when pressing enter
 
On 20 aug, 14:17, "Don Guillett" wrote:
right click the sheet tabview codeleft window select worksheetright
window select worksheet_changeput your FIND code there

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"bartman1980" wrote in message

ups.com...



I want to make a some kind of CTRL-F field in my sheet.


If the text (or a part of the text) in cell F1 is found in row A then
select the cell with the text where it was found.
And when I'm in the cell F1, I prefer just to press 'enter' instead of
clicking on a button.


Does somebody have an example?- Tekst uit oorspronkelijk bericht niet weergeven -


- Tekst uit oorspronkelijk bericht weergeven -


I know how to get in the VBA editor, but do you have this FIND code
for me?


Don Guillett

Search and select a cell when pressing enter
 
Easy to do it for you but why not look in the vba help index for FIND

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"bartman1980" wrote in message
ups.com...
On 20 aug, 14:17, "Don Guillett" wrote:
right click the sheet tabview codeleft window select worksheetright
window select worksheet_changeput your FIND code there

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"bartman1980" wrote in
message

ups.com...



I want to make a some kind of CTRL-F field in my sheet.


If the text (or a part of the text) in cell F1 is found in row A then
select the cell with the text where it was found.
And when I'm in the cell F1, I prefer just to press 'enter' instead of
clicking on a button.


Does somebody have an example?- Tekst uit oorspronkelijk bericht niet
weergeven -


- Tekst uit oorspronkelijk bericht weergeven -


I know how to get in the VBA editor, but do you have this FIND code
for me?



bartman1980

Search and select a cell when pressing enter
 
On 20 aug, 17:07, "Don Guillett" wrote:
Easy to do it for you but why not look in the vba help index for FIND

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"bartman1980" wrote in message

ups.com...



On 20 aug, 14:17, "Don Guillett" wrote:
right click the sheet tabview codeleft window select worksheetright
window select worksheet_changeput your FIND code there


--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"bartman1980" wrote in
message


roups.com...


I want to make a some kind of CTRL-F field in my sheet.


If the text (or a part of the text) in cell F1 is found in row A then
select the cell with the text where it was found.
And when I'm in the cell F1, I prefer just to press 'enter' instead of
clicking on a button.


Does somebody have an example?- Tekst uit oorspronkelijk bericht niet
weergeven -


- Tekst uit oorspronkelijk bericht weergeven -


I know how to get in the VBA editor, but do you have this FIND code
for me?- Tekst uit oorspronkelijk bericht niet weergeven -


- Tekst uit oorspronkelijk bericht weergeven -


Hi Don,
I looked in the Help and I've made this code:

Sub searching()
string_searchvalue = Range("F1")
Columns("A:A").Find(What:=string_searchvalue,
After:=ActiveCell).Activate
End Sub

But this code doesn't combine numbers and letters with eachother.
And when He finds nothing, he gives an error, so I have to add an IF
nothing found then show message box "Nothing found"

I Also couldn't find the option of pressing enter instead of clicking
on the button.

Can you give me a hint?
At least I'm trying.


Don Guillett

Search and select a cell when pressing enter
 

Examples of your data and what you are trying to find.
Have you tried recording a macro while doing a manual find from the edit
menu?

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"bartman1980" wrote in message
oups.com...
On 20 aug, 17:07, "Don Guillett" wrote:
Easy to do it for you but why not look in the vba help index for FIND

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"bartman1980" wrote in
message

ups.com...



On 20 aug, 14:17, "Don Guillett" wrote:
right click the sheet tabview codeleft window select worksheetright
window select worksheet_changeput your FIND code there


--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"bartman1980" wrote
in
message


roups.com...


I want to make a some kind of CTRL-F field in my sheet.


If the text (or a part of the text) in cell F1 is found in row A
then
select the cell with the text where it was found.
And when I'm in the cell F1, I prefer just to press 'enter' instead
of
clicking on a button.


Does somebody have an example?- Tekst uit oorspronkelijk bericht
niet
weergeven -


- Tekst uit oorspronkelijk bericht weergeven -


I know how to get in the VBA editor, but do you have this FIND code
for me?- Tekst uit oorspronkelijk bericht niet weergeven -


- Tekst uit oorspronkelijk bericht weergeven -


Hi Don,
I looked in the Help and I've made this code:

Sub searching()
string_searchvalue = Range("F1")
Columns("A:A").Find(What:=string_searchvalue,
After:=ActiveCell).Activate
End Sub

But this code doesn't combine numbers and letters with eachother.
And when He finds nothing, he gives an error, so I have to add an IF
nothing found then show message box "Nothing found"

I Also couldn't find the option of pressing enter instead of clicking
on the button.

Can you give me a hint?
At least I'm trying.



Don Guillett

Search and select a cell when pressing enter
 
Try this. I tried with aaa23

Why do you need to "activate". You rarely need to select or activate. You
could use .copy for instance.

Sub searchA()
Columns(1).Find(Range("f1")).Activate
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"bartman1980" wrote in message
oups.com...
On 20 aug, 17:07, "Don Guillett" wrote:
Easy to do it for you but why not look in the vba help index for FIND

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"bartman1980" wrote in
message

ups.com...



On 20 aug, 14:17, "Don Guillett" wrote:
right click the sheet tabview codeleft window select worksheetright
window select worksheet_changeput your FIND code there


--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"bartman1980" wrote
in
message


roups.com...


I want to make a some kind of CTRL-F field in my sheet.


If the text (or a part of the text) in cell F1 is found in row A
then
select the cell with the text where it was found.
And when I'm in the cell F1, I prefer just to press 'enter' instead
of
clicking on a button.


Does somebody have an example?- Tekst uit oorspronkelijk bericht
niet
weergeven -


- Tekst uit oorspronkelijk bericht weergeven -


I know how to get in the VBA editor, but do you have this FIND code
for me?- Tekst uit oorspronkelijk bericht niet weergeven -


- Tekst uit oorspronkelijk bericht weergeven -


Hi Don,
I looked in the Help and I've made this code:

Sub searching()
string_searchvalue = Range("F1")
Columns("A:A").Find(What:=string_searchvalue,
After:=ActiveCell).Activate
End Sub

But this code doesn't combine numbers and letters with eachother.
And when He finds nothing, he gives an error, so I have to add an IF
nothing found then show message box "Nothing found"

I Also couldn't find the option of pressing enter instead of clicking
on the button.

Can you give me a hint?
At least I'm trying.



bartman1980

Search and select a cell when pressing enter
 
On 21 aug, 15:33, "Don Guillett" wrote:
Try this. I tried with aaa23

Why do you need to "activate". You rarely need to select or activate. You
could use .copy for instance.

Sub searchA()
Columns(1).Find(Range("f1")).Activate
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"bartman1980" wrote in message

oups.com...



On 20 aug, 17:07, "Don Guillett" wrote:
Easy to do it for you but why not look in the vba help index for FIND


--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"bartman1980" wrote in
message


roups.com...


On 20 aug, 14:17, "Don Guillett" wrote:
right click the sheet tabview codeleft window select worksheetright
window select worksheet_changeput your FIND code there


--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"bartman1980" wrote
in
message


roups.com...


I want to make a some kind of CTRL-F field in my sheet.


If the text (or a part of the text) in cell F1 is found in row A
then
select the cell with the text where it was found.
And when I'm in the cell F1, I prefer just to press 'enter' instead
of
clicking on a button.


Does somebody have an example?- Tekst uit oorspronkelijk bericht
niet
weergeven -


- Tekst uit oorspronkelijk bericht weergeven -


I know how to get in the VBA editor, but do you have this FIND code
for me?- Tekst uit oorspronkelijk bericht niet weergeven -


- Tekst uit oorspronkelijk bericht weergeven -


Hi Don,
I looked in the Help and I've made this code:


Sub searching()
string_searchvalue = Range("F1")
Columns("A:A").Find(What:=string_searchvalue,
After:=ActiveCell).Activate
End Sub


But this code doesn't combine numbers and letters with eachother.
And when He finds nothing, he gives an error, so I have to add an IF
nothing found then show message box "Nothing found"


I Also couldn't find the option of pressing enter instead of clicking
on the button.


Can you give me a hint?
At least I'm trying.- Tekst uit oorspronkelijk bericht niet weergeven -


- Tekst uit oorspronkelijk bericht weergeven -


I just want to make a search function for the people who want to
select the right items in the list.
This selection is done by putting manually a 1 in the cell next to it.
The searchfunction you mentioned is only for finding the first item
with the search criteria. After finding the first one, he doesn't
continue to the other ones.

When I try to find 444 the code stops, I need to have a messagebox in
it which says "444 not found"


Don Guillett

Search and select a cell when pressing enter
 
Look in the vba help index for FINDNEXT

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"bartman1980" wrote in message
ps.com...
On 21 aug, 15:33, "Don Guillett" wrote:
Try this. I tried with aaa23

Why do you need to "activate". You rarely need to select or activate. You
could use .copy for instance.

Sub searchA()
Columns(1).Find(Range("f1")).Activate
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"bartman1980" wrote in
message

oups.com...



On 20 aug, 17:07, "Don Guillett" wrote:
Easy to do it for you but why not look in the vba help index for FIND


--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"bartman1980" wrote
in
message


roups.com...


On 20 aug, 14:17, "Don Guillett" wrote:
right click the sheet tabview codeleft window select
worksheetright
window select worksheet_changeput your FIND code there


--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"bartman1980"
wrote
in
message


roups.com...


I want to make a some kind of CTRL-F field in my sheet.


If the text (or a part of the text) in cell F1 is found in row A
then
select the cell with the text where it was found.
And when I'm in the cell F1, I prefer just to press 'enter'
instead
of
clicking on a button.


Does somebody have an example?- Tekst uit oorspronkelijk bericht
niet
weergeven -


- Tekst uit oorspronkelijk bericht weergeven -


I know how to get in the VBA editor, but do you have this FIND code
for me?- Tekst uit oorspronkelijk bericht niet weergeven -


- Tekst uit oorspronkelijk bericht weergeven -


Hi Don,
I looked in the Help and I've made this code:


Sub searching()
string_searchvalue = Range("F1")
Columns("A:A").Find(What:=string_searchvalue,
After:=ActiveCell).Activate
End Sub


But this code doesn't combine numbers and letters with eachother.
And when He finds nothing, he gives an error, so I have to add an IF
nothing found then show message box "Nothing found"


I Also couldn't find the option of pressing enter instead of clicking
on the button.


Can you give me a hint?
At least I'm trying.- Tekst uit oorspronkelijk bericht niet weergeven -


- Tekst uit oorspronkelijk bericht weergeven -


I just want to make a search function for the people who want to
select the right items in the list.
This selection is done by putting manually a 1 in the cell next to it.
The searchfunction you mentioned is only for finding the first item
with the search criteria. After finding the first one, he doesn't
continue to the other ones.

When I try to find 444 the code stops, I need to have a messagebox in
it which says "444 not found"




All times are GMT +1. The time now is 10:46 AM.

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