search macro

Hi, does anyone know how to make a macro that would search for text tha
is in a cell?...Here's what I have, in A2 I have inserted a validatio
list and at the end of the cell I made a command button from the form
toolbox and would like to attach a macro that would search for what i
in cell A2, there are multiple entries for each name in the list so i
would have to find them one at a time  and then go back to the top i
there are no more to be found down in the worksheet!

Thanks
Jean-Guy Collette
Canad

--
Message posted from http://www.ExcelForum.com

0
2/21/2004 1:22:15 PM
excel.misc 78881 articles. 5 followers. Follow

7 Replies
272 Views

Similar Articles

[PageSpeed] 29

Hi Jean-Guy

Record a macro while performing it with Edit > Find menu and you're pretty
much done.

--
HTH. Best wishes Harald
Followup to newsgroup only please

"pinmaster >" <<pinmaster.11za71@excelforum-nospam.com> skrev i melding
news:pinmaster.11za71@excelforum-nospam.com...
> Hi, does anyone know how to make a macro that would search for text that
> is in a cell?...Here's what I have, in A2 I have inserted a validation
> list and at the end of the cell I made a command button from the forms
> toolbox and would like to attach a macro that would search for what is
> in cell A2, there are multiple entries for each name in the list so it
> would have to find them one at a time  and then go back to the top if
> there are no more to be found down in the worksheet!
>
> Thanks
> Jean-Guy Collette
> Canada
>
>
> ---
> Message posted from http://www.ExcelForum.com/
>


0
innocent (844)
2/21/2004 2:16:11 PM
Hi, Harold. ...that does not work!...any other idea?

Jean-Gu

--
Message posted from http://www.ExcelForum.com

0
2/21/2004 3:09:31 PM
"Pretty much done" is not "completely working". In what way does which code
not work ?

--
HTH. Best wishes Harald
Followup to newsgroup only please

"pinmaster >" <<pinmaster.11zf5t@excelforum-nospam.com> skrev i melding
news:pinmaster.11zf5t@excelforum-nospam.com...
> Hi, Harold. ...that does not work!...any other idea?
>
> Jean-Guy
>
>
> ---
> Message posted from http://www.ExcelForum.com/
>


0
innocent (844)
2/21/2004 3:18:32 PM
Ok. here's what I did.....I clicked on "record new macro" and then 
selected a name from the list in cell A2, copied it, clicked on "edit"
"find" paste and then search, closed the window and stopped th
macro!...but even if I change the name in the list, it only searche
for the one that I originally copied!

Jean-Gu

--
Message posted from http://www.ExcelForum.com

0
2/21/2004 4:19:05 PM
So it's 99% done then. Told ya :-)
Replace what looks like something like this

Cells.Find(What:="Jean",

with exactly this

Cells.Find(What:=Range("A2").Value,

--
HTH. Best wishes Harald
Followup to newsgroup only please.

"pinmaster >" <<pinmaster.11zidr@excelforum-nospam.com> wrote in message
news:pinmaster.11zidr@excelforum-nospam.com...
> Ok. here's what I did.....I clicked on "record new macro" and then I
> selected a name from the list in cell A2, copied it, clicked on "edit",
> "find" paste and then search, closed the window and stopped the
> macro!...but even if I change the name in the list, it only searches
> for the one that I originally copied!
>
> Jean-Guy
>
>
> ---
> Message posted from http://www.ExcelForum.com/
>


0
innocent (844)
2/21/2004 6:23:47 PM
Ok...I did EXCACTLY :-) what you said, still wasn't working, so then 
Opened up the macro and deleted the first few lines and *voila*, I go
my search button!.... a big thank you for you patience man, I know i
wasn't easy, much apreciated. :-) 

Best Regards
Jean-Guy Collette
Canad

--
Message posted from http://www.ExcelForum.com

0
2/21/2004 8:02:14 PM
"pinmaster >" <<pinmaster.11zspo@excelforum-nospam.com> skrev i melding
news:pinmaster.11zspo@excelforum-nospam.com...
> Ok...I did EXCACTLY :-) what you said, still wasn't working, so then I
> Opened up the macro and deleted the first few lines and *voila*, I got
> my search button!.... a big thank you for you patience man, I know it
> wasn't easy, much apreciated. :-)

Glad to hear that. Thank you for the feedback.

Best wishes Harald
Followup to newsgroup only please


0
innocent (844)
2/22/2004 10:51:14 AM
Reply:

Similar Artilces:

Search last 4 digits in an (account number)
I store bank accunt and credit card numbers in various Contact Notes. For example, a credit card # as xxxxxxxxxxxx1234. Outlook contact search would not find this contact if I enter the search for "1234". Is there a way to do this in Outlook 2007? TIA PS - this search works fine in Outlook Mobile. outlook searches from the beginning - so it will only work if you use xxxxxxxxxxxx 1234. Other search tools (like google desktop) may find it. -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: htt...

Amendment need to Macro !
Amendment need to Macro ! This macro copies a cell down every 72 cells till 5112, Is it possible to have a Macro copy a selection of cells down the same after highlighting them? Public Sub CopySelectionEvery72UntilRow5112() Dim i As Long Dim destRng As Range With Selection(1) Set destRng = .Cells For i = .Row + 72 To 5112 Step 72 Set destRng = Union(destRng, Cells(i, .Column)) Next i .Copy destRng End With End Sub -- Thanks in advance for your help....Bob Vance .. .. .. .. Bob, Just remo...

Support __FUNCTION__ macro
Hi all, i have a problem about __FUNCTION__ macro, i can't use this macro in VC6. I got error above error C2065: '__FUNCTION__' c++ Can you help me? Thanks. Check out this article... that macro is not available in VC6 so unless you can upgrade to a later compiler you're going to have to do something like this: http://www.codeproject.com/KB/tips/xtrace.aspx Tom "James Duy Trinh" <vietdoor@gmail.com> wrote in message news:OCXXCiJ9IHA.4088@TK2MSFTNGP03.phx.gbl... > Hi all, > > i have a problem about __FUNCTION__ macro, i can't use this ma...

Look for: Search In => Choose folders=> Search subfolders not working
When I search for an old email using Outlook's Look for: box and specify which folders to search in via the "Choose folders=>Search subfolders" checking a folder does not actually cause any subfolders to be checked. Unless there is some other setting and/or option hidden away somewhere, the "Search subfolders" check box is not working. I must manually check all the desired subfolders. What am I doing wrong? -- Regards, Peter Sale Santa Monica, CA USA To email me, just pull 'my-leg.' ...

running macros in excel
Does anyone know if I can run a macro automatically when I open the spreadsheet ? thanks. Call the macro Auto_Open, or add your code to the Workbook_Open event. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "bobuk" <anonymous@discussions.microsoft.com> wrote in message news:fbb201c3f219$2e99ee50$a401280a@phx.gbl... > Does anyone know if I can run a macro automatically when I > open the spreadsheet ? thanks. ...

Searching for Newsgroups
I subscribe to a Usenet service for accessing various news groups. After I download all the newsgroups from that server I can not find a way to search for the newsgroups I have interest in. When I put something like "RV" in the search box on the top right corner, it searches all of my Emails rather than just the list of groups that had "RV" in the title. Help tells me that there is a " Display newsgroups containing" box but for the life of me I can't find it. Any thoughts out there? I am running Entourage 12.2.3 Dunc Click the bar in th...

Search & replace in formulae
Is it possible to do a search and replace which includes the cell formula contents ? I have a workbook that has cells which link to the contents of a cell in another workbook and I'd like to know if the naming has to remain constant or if I can replace a part of the name periodically. ie each year. thanks "Iain Rhodes" <iain@pricejam.com> wrote in message news:8ec201c49682$858c5d20$a501280a@phx.gbl... > Is it possible to do a search and replace which includes > the cell formula contents ? I have a workbook that has > cells which link to the contents of a cel...

Search engine optimization
Hello all! My question today regarding this issue is: I have noticed some sites have the following on their sites "Source". meta name= "robots" content="Index, follow" meta name= "revisit-after" content="15 days" or (30 days) What does this function accomplish as far as search engines go? and will it really imporve your results ( rankings) Like for instance "robots" "index, all" what is the difference between this and saying "robots" "index, follow" I'm a bit confused about this. Can someone ...

Macros in PERSONAL.XLS
Excel 2003; Windows XP OS. I have a series of macros in my PERSONAL.XLS workbook that create a number of different pivot tables. I can't set up to run automatically, as I must create the datatables daily and they are a different size each day. The macros must be executed in the order they were created or they 'bomb'. When I look at the VBA code, each different macro contains a numbered pivottable reference, reflecting its creation order (e.g. PivotTable3). Is there a way to make the references valid regardless of the order in which they are executed? When you c...

Can I search identical fields from multiple tables?
I have a database to log details about staff in my school. I have a tables for staff details, courses, absence, educational visits etc. In each table I have a date field to show when the member of staff is not present. I want to produce a query to search all tables by entering a date - e.g. to bring back all results for staff who are not in school on a certiain day because they are either ill, on a course or on an educational visit. The query will work by entering a date once - it will then search all the other tables and bring back the results. Is this possible? Do I restructure? ...

Running macros for different cells at the same time
Hi all, Is it possible to run different macros on different cells at the sam time? If so how do I go about setting it up? Cheers Michae -- Message posted from http://www.ExcelForum.com Hi not really sure what you're trying to do. Could you give an example? -- Regards Frank Kabel Frankfurt, Germany > Hi all, > > Is it possible to run different macros on different cells at the same > time? If so how do I go about setting it up? > > Cheers > > Michael > > > --- > Message posted from http://www.ExcelForum.com/ Yes it is possible to run different m...

What does outlook search when you search Contacts ?
When you do a search in oulook for contacts, what is the criteria that outlook searches? Or I guess how does outlook search? Why is it not consistant? The reason I am asking is that we have our customers contacts in public folders. In our customers we have 6 contacts for XYZ Foods. If you search in outlook for just "XYZ" it only comes back with 4 of the six. If you do a search for "XYZ Foods" it returns with all 6. And if you just entered "Foods" no contacts were found. And we actually have a few companies in our contacts who's names are a two part name ending...

excel VBA
How would i search a range of a whole column instead of specific cells like .Range("a1:a300")? --- Message posted from http://www.ExcelForum.com/ ..range("a:a") ..columns(1) ..range("a1").entirecolumn are a few ways. "Zygoid <" wrote: > > How would i search a range of a whole column instead of specific cells > like .Range("a1:a300")? > > --- > Message posted from http://www.ExcelForum.com/ -- Dave Peterson ec35720@msn.com ahhh! Thanks!! I was trying .Column(1) i see i neede an "s" in there Thanks a...

Excel 2007 Macro Security
Hello all, I'm having problems with macros in Excel 2007. The only way I can run macros is to have the security wide open which I know is not good. If the setting is anything other than wide open I get this message. "Cannot run the macro JRNL1.xls!NewJournalSheet". The Macro may not be available in this workbook or all macros may be disabled. The workbook is protected, could this be a problem? Appreciate any assistance. Thank you in advance, Ron In the Excel 2007 Trust Center settings for Macro security level, I've been relatively satisfied with the second opt...

Multiple fields using to search
Hi, Something i've been batteling for weeks with and theres probably such a simple answer to it and i just cant see it: Riiiight, i have this form (lets call it frmClientSearch) On this form i have a 2 list box thinghys; One called lstEmployee which is populated with Employee names and the other lstCity which is populated with City Names. Then i have a command button (cmdSearch) which, once click and values selected in both the lst boxes, should return only the values that are equal to both the lst boxes in a new form called frmSearchResult. (Hope i make sense) So... I know how ...

Removing macro #2
I am using Excel 97 (from Office Pro 97) on a new Vista machine. Every time I open a particular spreadsheet I get the option of enabling or disabling macros. I have no idea what this/these macro is all about - I never wrote a macro in my life -- and would like to know how to find it and delete it. Any help would be appreciated. --- Tony Vella, Ottawa, Canada http://indian-biographies.shorturl.com Debra Dalgleish shows how to clean up all the remnants of macros: http://www.contextures.com/xlfaqMac.html#NoMacros But if someone else developed the workbook, you may not want to delete any...

How do I create a macro to duplicate the current row?
I want to create a macro that will insert a blank row beneath the current row and will then copy the contents of the current row to the inserted row. I can do the operation manually but when I record it as a macro then run the macro it is not quite right. It works fine if I want to add just one new row. However, when I need run the macro to add further rows the macro always returns me to the point (row) where the I ran it for the first time. Does anyone know what I need to put into the macro, when editing it, to stop this happening? Hi As always post your macro for co...

Search, Search, Thanks
In the last couple of weeks I have been fighting with different ways o synching my laptop and my home pc. I have ended up with numerou duplicate entries, duplicate address books and duplicate contact lists ALL of my questions/problems I was able to resolve simply by searchin through the forums. Chances are if you have a problem you're not th first. There are some really good people on these forums that know alo more about Outlook than I do. Just my .02 Thank ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages dir...

Auto-start macro
Hello, I have a simple macro in Excel named Macro1. How can I make Macro1 run automatically everytime I start Excel? Simple step-by-step replies please. Thanks in advance. Try renaming it to: Auto_Open Frank wrote: > > Hello, I have a simple macro in Excel named Macro1. How can I make Macro1 > run automatically everytime I start Excel? Simple step-by-step replies > please. Thanks in advance. -- Dave Peterson Thanks Dave, worked great! "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message news:4B8E5D84.65E7E0CB@veriz...

Including imap folders in outlook 2003 search folders
Dear all, Is it possible to include imap accounts/folders as providers for "virtual" search folders in outlook 2003? At the moment, I only see the option to check folders in my personal folders but not to include imap folders. The reason that I ask is that I would like to be able to get a complete view of follow up tasks across all my accounts (1 pop3, 2 imap and 1 hotmail). Only the pop3 account gets delivered into the personal folders and is included in the follow up a nd unread search folders. Thanks for your help in advanced. Raj ...

Display search results
Using OneNote 2010 Beta: file tabs are on the left; how can I make search result tabs appear on the right? Now they don't appear at all: the first search result is displayed in the middle of the screen (that's fine) but no way to move to the next search result, nor any way to scrool them all the search results. I'd like to see all the search result tabs listed on the right so I can choose the one I want (as was the case with the version of OneNote that got replaced by 2010 beta). Many thanks for any help. -- CH I can't really visualize what you want, but h...

Notes export macro bug
Hello, I use the below macro from PPTools to export notes from PP 2003. However there is one bug. If there are no notes on a slide the output looks like this:Slide: 3636However when there ARE notes on a slide it puts the above string as well as the notes string. For example:Slide 37:37Slide 37:Notes from the slide.How do I get it to exclude the first part when there are notes?Thanks for your help!================================Sub ExportNotesText() Dim oSlides As Slides Dim oSl As Slide Dim oSh As Shape Dim strNotesText As String Dim strFileName As Stri...

Macro running slow
Hi, I'm self taught so my coding is very inefficient. Up until now this hasn't been a problem but my latest effort is taking far too long to run. Can anyone advice on where the bottleneck is and how I can speed it up? Thanks Mike CODE BELOW (sorry for the amount) -------------------- ActiveSheet.Unprotect Password:="XXXXXXX" ' Unprotects the worksheet Application.ScreenUpdating = False ' Stops the screen refreshing while the macro is running UserForm2.Show ' Reprotect the worksheet and end macro Range("I4").Select ...

Search
Is it possible to search on the results on a cell? For example, a cell may have a formula such as =3+5 You can search and find the 3 or the 5. The cell with show 8, is it possible to search for an 8 and have it find this cell? TIA Yes. In the Search dialog, choose Options and select Look in Values. -- Kind Regards, Niek Otten Microsoft MVP - Excel "berj" <berj@adelphia.net> wrote in message news:WbednSOFT7Cbp57fRVn-1Q@adelphia.com... > Is it possible to search on the results on a cell? > > For example, a cell may have a formula such as > > =3+5 >...

Search Form Problems
I have a form that has two fields in it. The first field is for a ID number, and the other is for the projects name. I am having a problem with using the form for as a search tool. Some of the values are duplicates in the drop down, I wanted to know how to properly filter the combo box so that the values can only be seen once. The Row Source is the name of the table that the fields are from, however this only words for the ID combo box and not the project name one. For some reason the values are from the ID column in the project name's combo box as well. To counter this problem, I si...