+ Reply to Thread
Results 1 to 10 of 10

Using find feature in macro

  1. #1
    Registered User
    Join Date
    08-17-2017
    Location
    Denver, co
    MS-Off Ver
    2016
    Posts
    5

    Using find feature in macro

    Hello,

    I think this is pretty basic, but I don't have a lot of knowledge on the subject.

    I'm trying to record a macro that performs the following steps:

    copy the contents of a cell
    go to another tab
    open find dialogue box
    paste contents of copied cell in the find dialogue box
    find next and close dialogue box
    copy the contents of the cell to left of search results
    go back to original tab
    paste contents in cell below

    This all works fine except when I run the macro, it always finds the exact contents I pasted in the find box when I recorded the macro. So I guess it's not pasting the new contents in the find box when running the macro. Can I make it do that somehow?

    This is my first time posting so I hope I'm following the correct procedure and that this is clear.

    Thank you for your help!

    Deb

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Using find feature in macro

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Using find feature in macro

    Hi Deb,

    Something like this perhaps?

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  4. #4
    Registered User
    Join Date
    08-17-2017
    Location
    Denver, co
    MS-Off Ver
    2016
    Posts
    5

    Re: Using find feature in macro

    Hello mehmetcik,

    I've attached a very basic spreadsheet with the recorded macro.

    Thank you for your quick reply and offer to help!

    Deb
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Using find feature in macro

    Two simple formulas do what you need

    in B2
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In B3

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    As a Macro

    Please Login or Register  to view this content.
    Last edited by mehmetcik; 08-17-2017 at 02:06 PM.

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Using find feature in macro

    Did you see post #3??

  7. #7
    Registered User
    Join Date
    08-17-2017
    Location
    Denver, co
    MS-Off Ver
    2016
    Posts
    5

    Re: Using find feature in macro

    Thank you xladept, I did see your post. I'm not at all good at reading VBA code so I'm not sure I can make this work in my spreadsheet. I know what I am trying to do should be very simple...I just have little knowledge

    I do plan to take a look at your post again when I have some time to study it because I'd like to be able to learn from it.

    Thank you very much for your help!

  8. #8
    Registered User
    Join Date
    08-17-2017
    Location
    Denver, co
    MS-Off Ver
    2016
    Posts
    5

    Re: Using find feature in macro

    Thank you very much mehmetcik! I will work on incorporating this into my spreadsheet. Unfortunately, I need to direct my attention elsewhere for a few hours. Hopefully I can spend some more time on it this afternoon. I do appreciate your help!

    Deb

  9. #9
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Using find feature in macro

    There are just about eight lines of code - the rest are your specifications - I tried to put the code close to the spec it addressed

  10. #10
    Registered User
    Join Date
    08-17-2017
    Location
    Denver, co
    MS-Off Ver
    2016
    Posts
    5

    Re: Using find feature in macro

    Thank you xladept. I do appreciate the help. I'll let you know if I'm successful!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Using the Find feature
    By mknispel in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-22-2016, 11:29 AM
  2. Find feature in userform
    By rayexcel in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 10-01-2014, 11:12 AM
  3. Macro that uses the find feature to find a cell and change.
    By Damiantos in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-07-2014, 08:13 AM
  4. [SOLVED] Use the find feature in a macro
    By KLT in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-17-2012, 02:57 PM
  5. Find feature not working
    By mrstinicum in forum Excel General
    Replies: 3
    Last Post: 04-22-2012, 03:40 PM
  6. cannot use find and replace feature
    By mingali in forum Excel General
    Replies: 4
    Last Post: 06-16-2010, 12:48 AM
  7. Replies: 1
    Last Post: 04-27-2009, 08:12 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1