Solved

How do I copy the FIND results in Excel 2010 to another worksheet ?

Posted on 2013-01-24
2
1,416 Views
Last Modified: 2013-01-24
Hi,

I'm trying to copy the FIND results returned as they appear in a 'Find and Replace' dialog box in Excel 2010, so I can print them out.

A screenshot will not catch those results which require scrolling.

Any ideas ?
Thanks
Toco
0
Comment
Question by:Tocogroup
2 Comments
 
LVL 24

Accepted Solution

by:
Steve earned 500 total points
ID: 38814360
You could use something like the attached function:

Function find_all(str As String, rng As Range) As String
    For Each c In rng
        If InStr(1, c.Value, str, vbTextCompare) > 0 Then
            find_all = find_all & c.Address & " "
        End If
    Next
End Function

Open in new window



thsi folowing function (not in file attached) will allow you to copy the cell result into word or similar with one line per result:
Function find_all(str As String, rng As Range) As String
    Dim c As Range
    For Each c In rng
        If InStr(1, c.Value, str, vbTextCompare) > 0 Then
            find_all = find_all & c.Worksheet.Name & "!" & c.Address & vbCrLf
        End If
    Next
End Function

Open in new window

FindAll-example.xlsm
0
 

Author Closing Comment

by:Tocogroup
ID: 38815365
That's great. Many thanks Barman.
Toco
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question