I've been working on an excel sheet where I am using a macro to basically run a 'Find Function' to find a word/phrase on a separate sheet and then delete the entire column that this word/phrase is located in. Currently, I have this:
This works perfectly to reference Cell C53 (which is where the word/phrase is inputted by a user) and then go to the 'Forecast' sheet and delete the columns the word/phrase is located in along with the subsequent columns to the right until the next populated column. However, I need it to do 2 more things.
a. Currently it only finds the word once- basically it "finds next" instead of "find all". I was thinking making a loop so that once it finds one and deletes the column, it finds the same word again and deletes that column (and the subsequent empty rows next to it) until the word is no longer on the sheet at all.
b. Secondly, I need it to find more than one word/phrase. Right now it references cell 'C53' but I need it to then go on to 'C54' and do the same thing, then 'C55', then 'C56', etc. etc. UNTIL it reaches a cell that simply has a '0' in it.
Any help with this 'Loop Inception' problem would be greatly appreciated! I am very new to VBA and I was just given the task of doing this
Thanks!
Bookmarks