How can I reset or clear the cells.find after macro runs? It is giving wrong results!
How can I reset or clear the cells.find after macro runs? It is giving wrong results!
We need more info, at least post the code.
Ben Van Johnson
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
Last edited by jarhead58; 04-07-2020 at 10:00 AM.
Moderators,
Should I start a new thread because of the comments in #3?
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.
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.
Checkbut what are you trying to do. Return the data in a or c columnPlease Login or Register to view this content.
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.
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.
try
Please Login or Register to view this content.
Last edited by nigelog; 04-08-2020 at 12:08 PM.
This one uses column Z as temporary help column.
Please Login or Register to view this content.
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.
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 ?
See attached for offset options
Last edited by nigelog; 04-09-2020 at 12:29 PM.
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!
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.
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks