excel vba - when a certain word is found in a cell, insert a line -
i trying write macro when button clicked, information transfered 1 spreadsheet onto form (also excel sheet). can't seem 1 thing right: insert lines when reach bottom of form. @ bottom of form, in column a, says:additional. want insert line every time come in contact cell. please help!
for example:
= 1 lastline worksheet1.range("a" & i).value = worksheet2.range("a" & i) if worksheet1.range("a" & i).value contains "additional" 'please me write line insert line above cell 'please me write line end if next
please help!!! in advance! let me know if question makes sense :)
dim tmp, skip long skip = 0 = 1 lastline tmp = worksheet2.range("a" & i).value if lcase(tmp) "*additional*" skip = skip + 1 worksheet1.cells(i + skip, 1).value = tmp next
Comments
Post a Comment