ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Interactive Find and Copy (https://www.excelbanter.com/excel-programming/414421-interactive-find-copy.html)

Glory2God

Interactive Find and Copy
 
I would like to create a macro that will ask the user for a string, find the
first occurrence in a range and then ask the user if the find is correct. If
the find is correct I want to copy the cell to the left of the find back into
the cell from which the find was initiated. If the find is incorrect I would
like to search for the next occurrence of the string and then ask again. If
the sting is not found I would like the cursor to return to the orignial cell
from which the find was initiated.

StumpedAgain

Interactive Find and Copy
 
I would recommend using the macro recorder, vbYesNo in the message box,
inputbox, and the Find and FindNext methods. Someone might be up to the task
of creating this for you, but it shouldn't be too hard using these tools to
create what you want. Good luck!

--
-SA


"Glory2God" wrote:

I would like to create a macro that will ask the user for a string, find the
first occurrence in a range and then ask the user if the find is correct. If
the find is correct I want to copy the cell to the left of the find back into
the cell from which the find was initiated. If the find is incorrect I would
like to search for the next occurrence of the string and then ask again. If
the sting is not found I would like the cursor to return to the orignial cell
from which the find was initiated.


Glory2God

Interactive Find and Copy
 
I was really hoping that someone could help me out with the code. I am not
that good with VBA but have usually been able to adapt another's solution to
mine and, in this case, I can't seem to pull it off.

I currently am trying to use a "select the cell" when the first find does
not produce the correct result. Unfortunatly that one is producing one
undesired result that I can't see to fix.

Can you help?

"StumpedAgain" wrote:

I would recommend using the macro recorder, vbYesNo in the message box,
inputbox, and the Find and FindNext methods. Someone might be up to the task
of creating this for you, but it shouldn't be too hard using these tools to
create what you want. Good luck!

--
-SA


"Glory2God" wrote:

I would like to create a macro that will ask the user for a string, find the
first occurrence in a range and then ask the user if the find is correct. If
the find is correct I want to copy the cell to the left of the find back into
the cell from which the find was initiated. If the find is incorrect I would
like to search for the next occurrence of the string and then ask again. If
the sting is not found I would like the cursor to return to the orignial cell
from which the find was initiated.



All times are GMT +1. The time now is 09:51 PM.

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