Hello, I need some addition help with a search macro.
What I have
I currently have a search macro set up the searches column A for what you have typed into H5, if it finds the value in H5 in column A it copies columns A to F and pastes that info into H12- M12 (first it will clear all contents in these cells to avoid showing the wrong results) The macro is written as follows:
![]()
Sub Search() Range("H11").CurrentRegion.ClearContents: Range("H11") = "Results" FindWhat = (Range("H5")) For Each Cell In Range("A2", Range("A" & Rows.Count).End(xlUp)) If InStr(Cell, FindWhat) <> 0 Then Cell.Offset(, 0).Resize(, 7).Copy Range("H" & Rows.Count).End(xlUp).Offset(1, 0) End If Next Cell End Sub
What I need
The macro only searches for single values for example if I type in lion I will get all results with lion involved but if I type in angry lion I will show no results even though in column A I have lion, cat, angry, fierce. Also if i type in Lion I will get nothing due to the upper case.
1. Is there a way to search for both upper and lower case values?
2. How can I search for multiple words at once that are not right next to each other?
any help would be greatly appreciated, thanks.
-Joe.
Bookmarks