Before anybody says anything, I have looked through several of the posts relating to this similar idea (going by different search criterial and then modifying it) but I can't get the macro to work. This is probably due to my lack of programming knowledge! All I want to do is, search for an email address in WORKSHEET 1 and if it finds it, copy the whole row to the next free row in WORKSHEET 2. I'm using Excel 2003 (yes I'm an old stick-in-the-mud!).
相关问题
- What is the best way to do a search in a large fil
- Excel sunburst chart: Some labels missing
- Error handling only works once
- Error handling only works once
- Excel formula in VBA code
相关文章
- What is the complexity of bisect algorithm?
- Get column data by Column name and sheet name
- programmatically excel cells to be auto fit width
- Unregister a XLL in Excel (VBA)
- Unregister a XLL in Excel (VBA)
- Visual Studio: Is there an incremental search for
- How to prevent excel from truncating numbers in a
- numeric up down control in vba
This Code should be a lot simpler for doing the copy on the same workbook, I'm leaving my last answer there just incase you need it to work across workbooks as well :)
Actually I think you're a smart person; personally I detest 2007/2010's user interface for many reasons.
To answer your question, see whether this make sense. (It's quick and dirty so it isn't bullet-proofed. It should give you a starting point, though.)
I have put together the following code which will look at the contents of a range of cells and copy the rows of cells that contain certain strings, "@" in this case, to a new row of a target workbook.
'SET THIS TO YOUR DESTINATION WORBOOK Path/Workbook Name/Worksheet Name
'THIS OPENS THE DESTINATION WORKBOOK IF IT IS CLOSED
'SET THIS RANGE TO THE CELLS YOU WANT TO CHECK FOR EMAIL
'SET THE CALCULATION FOR DETERMINING AN EMAIL ADDRESS HERE (Currently it just checks for an @ symbol)
'THIS FINDS AND SELECTS THE NEXT EMPTY ROW ON THE DESTINATION SHEET
Apologies if i have messed up the code tags, I'm new to the site :)