V
Vic
I would like to seach for a word in a range of cells and when found,
copy and paste that cell into another page. I built a little macro but
have a challenge if the word I am searching-for is not found
(something I did not plan-for and I am a newbie for-sure).
here is what it does now:
' find "component(s)" and copy
Cells.Find(What:="component(s):", After:=ActiveCell,
LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
Selection.Copy
' select different worksheet to paste-to
Sheets("Condensed ChangeLog").Select
' Paste "component(s)"
ActiveCell.Offset(2, -1).Select
ActiveSheet.Paste
So with the new issue where it may not be found, I would like to
instead paste in the destination cell the words "no components found".
So it seems I need some logic that if-not found, then...
Help appreciated.
~Vic
copy and paste that cell into another page. I built a little macro but
have a challenge if the word I am searching-for is not found
(something I did not plan-for and I am a newbie for-sure).
here is what it does now:
' find "component(s)" and copy
Cells.Find(What:="component(s):", After:=ActiveCell,
LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
Selection.Copy
' select different worksheet to paste-to
Sheets("Condensed ChangeLog").Select
' Paste "component(s)"
ActiveCell.Offset(2, -1).Select
ActiveSheet.Paste
So with the new issue where it may not be found, I would like to
instead paste in the destination cell the words "no components found".
So it seems I need some logic that if-not found, then...
Help appreciated.
~Vic