View Single Post
 
Old 01-06-2017, 11:44 PM
trevorc trevorc is offline Windows 7 32bit Office 2013
Competent Performer
 
Join Date: Jan 2017
Posts: 122
trevorc will become famous soon enoughtrevorc will become famous soon enough
Default change 'Found.EntireRow.Copy' to a # of columns

I need to change the code below so that it returns a range of cells rather than the entire row, I need it to return a range of B to K columns for the found row.
found is the search string i'm looking for.

Code:
Set Found = .UsedRange.Find(what:=myText, LookIn:=xlValues, LookAt:=xlPart, MatchCase:=False)
            If Not Found Is Nothing Then
                FirstAddress = Found.Address
                Do
                    foundNum = foundNum + 1
                    AddressStr = .Name & " " & Found.Address & vbCrLf
                    Set Found = .UsedRange.FindNext(Found)Found.EntireRow.Copy Destination:=Worksheets("instructions").Range("a2" & foundNum)
Can you help?

thanks in advance.
Reply With Quote