how to find duplicate words, or numbers

June 29, 2010 at 20:35:15
Specs: Windows Vista
Any easy ways to find duplicate words, or numbers in a word file, or excel spreadsheet?

See More: how to find duplicate words, or numbers

June 30, 2010 at 05:32:17

With as much information as you have provided, that's as much of an answer that we can provide.

Would you care to share a few more details as to what you are trying accomplish?

Report •

June 30, 2010 at 05:51:05

This little macro will report the address of each cell on the same worksheet that contains the text in the selected cell:

Public Sub FindDup()
Dim strFind As String
Dim rngCell As Range
strFind = ActiveCell.Text
If strFind <> "" Then
    For Each rngCell In ActiveSheet.UsedRange
        If rngCell.Text = strFind And rngCell.Address <> ActiveCell.Address Then
            MsgBox "Cell " & rngCell.Address & " contains: " & rngCell.Text
        End If
    Next rngCell
End If
End Sub

You don't say what version of Excel you are using, so I can't suggest instructions for how to run this macro.

Do you want this macro to be available for all workbooks or just for a specific workbook - this determines where you store the macro. The version of Excel determines how you add a button to run it.

PS If you have Excel 2008 for Mac, this will not work.

Report •

June 30, 2010 at 06:25:53
Thank you.

I have a list of job numbers, and I am trying to check which ones have been paid, and which ones have not been paid. About 50 to 100 job numbers I go thru.

Report •

Related Solutions

June 30, 2010 at 06:54:00

If you are looking to do an automated Find, then:
1. Tell us if you need to do this in Excel or in Word
2. For whichever program it is, provide information on where your job numbers are stored. - Are they in cells A1 to A50, or in the first table in a Word document etc.
If I look in a Word document for example and return all duplicates - I will get a whole load of words such as 'and' or 'it' returned, so knowing what to look for really helps.
3. An example of your job numbers would help e.g. N12345
4. What version of Word or Excel are you using.


Report •

Ask Question