excel5*user
New Member
- Joined
- Jun 19, 2010
- Messages
- 3
I need help with an Excel Macro. I need to find each occurence of 24 different TEXTs and next to each insert cells to add additional information. The number of occurences of each text varies and may appear in the range of K2:IV2000, so there may be for example 14 occurences of TEXT1 and then 35 occurences of TEXT2, and so on.
I need to find TEXT1 (ie. A1234) and insert a cell next to it, add text1a ( ie.B1234), and do this for all occurences of TEXT1. Then I need it to find TEXT2, insert a cell next to it and add text2a, and repeat for all occurences of TEXT2. etc for all 24 different TEXT. The find and insert part of the macro works, but I cannot get it to repeat correctly. I can only get it to find one occurence of each and when trying looping, the loop just finds the next TEXT whether it is TEXT1, TEXT2, TEXT3, etc. and performs the insert leaving several instances of each of the TEXTs skipped/not processed.
Thanks
I need to find TEXT1 (ie. A1234) and insert a cell next to it, add text1a ( ie.B1234), and do this for all occurences of TEXT1. Then I need it to find TEXT2, insert a cell next to it and add text2a, and repeat for all occurences of TEXT2. etc for all 24 different TEXT. The find and insert part of the macro works, but I cannot get it to repeat correctly. I can only get it to find one occurence of each and when trying looping, the loop just finds the next TEXT whether it is TEXT1, TEXT2, TEXT3, etc. and performs the insert leaving several instances of each of the TEXTs skipped/not processed.
Thanks