I am wanting to fill in a cell on sheet1 with either comment A or comment B depending on the value returned by VLOOKUP from sheet2. The comment and returned value are not the same. To achieve this I start with a for loop, use VLOOKUP, assign the returned value to a variable, test the value with If/Else statements and then assign the desired comment to the cell. The problem I am having is that the error "Compile Error: Next without For" appears when I excecute it. If I remove the If/Else statements it compiles fine. Am I not able to use the If/Else within a For loop? Is there a better way of accomplishing this?
Bookmarks