+ Reply to Thread
Results 1 to 18 of 18

reset cells.find

  1. #1
    Registered User
    Join Date
    10-10-2017
    Location
    North Charleston, SC
    MS-Off Ver
    2016
    Posts
    72

    reset cells.find

    How can I reset or clear the cells.find after macro runs? It is giving wrong results!

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,607

    Re: reset cells.find

    We need more info, at least post the code.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    10-10-2017
    Location
    North Charleston, SC
    MS-Off Ver
    2016
    Posts
    72

    Re: reset cells.find

    Actually, I think it is clearing with the code I am using. What I'm seeing with the code is that it isn't using the range that I declared.
    I have attached the test workbook. Also, this is an image of my results. The numbers in Row A are just a reference point for later.

    Capture2.JPG
    Attached Files Attached Files
    Last edited by jarhead58; 04-07-2020 at 10:00 AM.

  4. #4
    Registered User
    Join Date
    10-10-2017
    Location
    North Charleston, SC
    MS-Off Ver
    2016
    Posts
    72

    Re: reset cells.find

    Moderators,

    Should I start a new thread because of the comments in #3?

  5. #5
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: reset cells.find

    by using cells.find you are searching all cells in the sheet, using a,b,c etc as the criteria. If "Find" should only search your range then replace cells.find with rng3.find
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: reset cells.find

    Quote Originally Posted by jarhead58 View Post
    Moderators,

    Should I start a new thread because of the comments in #3?
    No - why???
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: reset cells.find

    Check
    Please Login or Register  to view this content.
    but what are you trying to do. Return the data in a or c column

  8. #8
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: reset cells.find

    Shortcut.
    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  9. #9
    Registered User
    Join Date
    10-10-2017
    Location
    North Charleston, SC
    MS-Off Ver
    2016
    Posts
    72

    Re: reset cells.find

    Hmmm...I sent a reply to the thread but it never appeared. Lets try this again!

    Akradi, bakerman2; yours both worked only I left out of the thread that I was also looking to include duplicates and their address', sorry!

    Nigelog, I totally missed that, thank you for pointing that out.

    AliGW, I wasn't sure if I needed to or not due to the fact I went a little further into the coding of it.

  10. #10
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: reset cells.find

    try
    Please Login or Register  to view this content.
    Last edited by nigelog; 04-08-2020 at 12:08 PM.

  11. #11
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: reset cells.find

    This one uses column Z as temporary help column.

    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    10-10-2017
    Location
    North Charleston, SC
    MS-Off Ver
    2016
    Posts
    72

    Re: reset cells.find

    Thank you both for helping with this. There's a lot that I don't understand about vba but I'm trying to soak it in! I'm 62 and I think my sponge is going bad lol! Bad, elder humor, but anyways, it's awesome what everyone involved in these forums does!

    One question, is there anyway to reference the address' once I have them? If I wanted to use one chosen number say C5 and reference it with another cell on the worksheet and use that cells information? I would think an offset of some kind but the way the address' are retrieved, I'm not sure how exactly.

  13. #13
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: reset cells.find

    It could be done but the only problem is that you have duplicates.

    For example your screenshot in Post#3. If you choose number 5 would it be C2 or C6, choosing 4 would it be C8 or C10 ?

  14. #14
    Registered User
    Join Date
    10-10-2017
    Location
    North Charleston, SC
    MS-Off Ver
    2016
    Posts
    72
    Quote Originally Posted by bakerman2 View Post
    It could be done but the only problem is that you have duplicates.

    For example your screenshot in Post#3. If you choose number 5 would it be C2 or C6, choosing 4 would it be C8 or C10 ?
    I would guess the first one it finds, no particular order.

  15. #15
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: reset cells.find

    See attached for offset options
    Attached Files Attached Files
    Last edited by nigelog; 04-09-2020 at 12:29 PM.

  16. #16
    Registered User
    Join Date
    10-10-2017
    Location
    North Charleston, SC
    MS-Off Ver
    2016
    Posts
    72

    Re: reset cells.find

    That's almost what I was looking for. Just if you could cascade the list by value, again no certain order. For eg. John, June, Ann, Nora, Peter, etc. top to bottom. Lets say, just the first 7 that get chosen!

  17. #17
    Registered User
    Join Date
    10-10-2017
    Location
    North Charleston, SC
    MS-Off Ver
    2016
    Posts
    72

    Re: reset cells.find

    Nigelog, could you tell me if I'm interpreting this code properly? I'm trying to get it worked out as stated in post #16. TIA

    Please Login or Register  to view this content.

  18. #18
    Registered User
    Join Date
    10-10-2017
    Location
    North Charleston, SC
    MS-Off Ver
    2016
    Posts
    72

    Re: reset cells.find

    After much experimenting and hair pulling; of which I had none to begin with lol; I finally figured it out. Here is the final code!

    Please Login or Register  to view this content.

+ 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. Replies: 1
    Last Post: 05-18-2019, 10:31 AM
  2. [SOLVED] How to reset excel for Ctrl-Shift-End to find updated last used cell?
    By london7871 in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 12-08-2017, 06:28 AM
  3. [SOLVED] I need to create a reset button that will reset rows containing a specific value
    By odin78 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 04-03-2016, 02:11 PM
  4. [SOLVED] How to reset Application.Find Format
    By HerryMarkowitz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-25-2015, 09:12 PM
  5. How to reset Find Dialog Box
    By HerryMarkowitz in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 10-18-2014, 07:37 PM
  6. Reset cells to zero
    By no dice in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-19-2007, 10:20 PM
  7. [SOLVED] reset cells to 0 all at once
    By Workshops in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 02-19-2006, 08:45 PM

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