tweedledum
New Member
- Joined
- Feb 13, 2009
- Messages
- 8
Hi
I need a macro to search for a value(this will be in A1 in sheet1) in sheet2 and output the first five rows with this value into sheet1. The numbers i am looking for are in column A in sheet2. so i want to search columnn A Sheet2 and output the first 5 rows that correspond with this value into sheet1 (say A6 to A11) the other columns contain comments, the number in A1sheet1 is a customer code there could be ten comments with this customer code or 200!!! this number (in A1 ) could change as its a vlookup from a data validation listbox, so when the supplier changes this number changes and the comments related to that customer wil come up so i need to be able to delete the old comments and replace them with the new ones in sheet1 everytime the number changes.
Can anyone help i am a little lost?? thanks in advance
I need a macro to search for a value(this will be in A1 in sheet1) in sheet2 and output the first five rows with this value into sheet1. The numbers i am looking for are in column A in sheet2. so i want to search columnn A Sheet2 and output the first 5 rows that correspond with this value into sheet1 (say A6 to A11) the other columns contain comments, the number in A1sheet1 is a customer code there could be ten comments with this customer code or 200!!! this number (in A1 ) could change as its a vlookup from a data validation listbox, so when the supplier changes this number changes and the comments related to that customer wil come up so i need to be able to delete the old comments and replace them with the new ones in sheet1 everytime the number changes.
Can anyone help i am a little lost?? thanks in advance