Hi all,
I've been rooting aorund trying to find some code that will allow me to look at a value in sheet A and find it in sheet B.
I have found the code below (not mine) but am not sure how to modify it so that instead of finding "Cat" it finds the value in the current active cell in sheet A.
I want to be able to start at 'Validator' BD7 and find that value in 'Data' column A, at the row where that is found I need to copy/paste values from 'Validator' BD:BZ and paste them to (row where the value was found) columns A to W. Once it has done that it needs to loop back to 'Validator' BD8 and continue until it finds an empty cell in 'Validator' BD
Sub Find_Bold_Cat()Dim lCount As LongDim rFoundCell As Range Set rFoundCell = Range("A1") For lCount = 1 To WorksheetFunction.CountIf(Columns(1), "Cat") Set rFoundCell = Columns(1).Find(What:="Cat", After:=rFoundCell, _ LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, _ SearchDirection:=xlNext, MatchCase:=False) With rFoundCell .ClearComments .AddComment Text:="Cat lives here" End With Next lCountEnd Sub</PRE>
</PRE>
Really stuck on this one
</PRE>
I've been rooting aorund trying to find some code that will allow me to look at a value in sheet A and find it in sheet B.
I have found the code below (not mine) but am not sure how to modify it so that instead of finding "Cat" it finds the value in the current active cell in sheet A.
I want to be able to start at 'Validator' BD7 and find that value in 'Data' column A, at the row where that is found I need to copy/paste values from 'Validator' BD:BZ and paste them to (row where the value was found) columns A to W. Once it has done that it needs to loop back to 'Validator' BD8 and continue until it finds an empty cell in 'Validator' BD
Sub Find_Bold_Cat()Dim lCount As LongDim rFoundCell As Range Set rFoundCell = Range("A1") For lCount = 1 To WorksheetFunction.CountIf(Columns(1), "Cat") Set rFoundCell = Columns(1).Find(What:="Cat", After:=rFoundCell, _ LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, _ SearchDirection:=xlNext, MatchCase:=False) With rFoundCell .ClearComments .AddComment Text:="Cat lives here" End With Next lCountEnd Sub</PRE>
</PRE>
Really stuck on this one
</PRE>
Last edited: