Trouble finding a way to export a Find All list

chwilson0607

New Member
Joined
Mar 24, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
I'm no Excel guru but am familiar enough with it - am having a heck of a time trying to find a way of exporting a list of Find All results to either a new worksheet or text file. None of the methods I've found will work. I am able to get the Find All results selected in the actual worksheet however when I try to copy using CTRL+C, I get an error saying "This action won't work on multiple selections". So my spreadsheet has MANY columns - all containing a list of email addresses - To, CC, and BCC. I imported into Excel and delimited so that address would appear in separate cells. Since some of the original cells contained MANY addresses, many columns were created. I'm trying to export a list of all addresses that match a certain email domain. Any help would be greatly appreciated.

Carl
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

offthelip

Well-known Member
Joined
Dec 23, 2017
Messages
1,811
Office Version
  1. 2010
Platform
  1. Windows
This macro will do this for you. :
VBA Code:
Sub test()
Dim outarr()
Dim txt As String

inarr = Worksheets("Sheet1").UsedRange
ReDim outarr(1 To UBound(inarr, 1) * UBound(inarr, 2), 1 To 1) ' define output array large enough for every cell
srch = InputBox("Enter the search string")
Worksheets.Add
indi = 2
For i = 1 To UBound(inarr, 1)
 For j = 1 To UBound(inarr, 2)
  txt = inarr(i, j)
  ps = InStr(1, txt, srch, 1)
 If ps > 0 Then
   outarr(indi, 1) = inarr(i, j)
   indi = indi + 1
  End If
 Next j
Next i
Range(Cells(1, 1), Cells(indi, 1)) = outarr

   

End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,129,678
Messages
5,637,741
Members
416,982
Latest member
lisam77

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top