Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-01-2015, 06:54 PM
iSlam Khaled iSlam Khaled is offline how to check for duplicated words / cells ? Windows 8 how to check for duplicated words / cells ? Office 2013
Novice
how to check for duplicated words / cells ?
 
Join Date: May 2015
Posts: 7
iSlam Khaled is on a distinguished road
Default how to check for duplicated words / cells ?

hallo everybody !
I am using word 2013 for making database


tables for some items and its counting .On
inserting so many items , there will be items
inserted twice or more ! Is there any way to
detect duplicate items ?Actually i can't use find &
replace because i don't know definitly duplicated items , that what i want to know ( detecting
duplicate words in the document ).Thanks
Reply With Quote
  #2  
Old 05-02-2015, 12:24 AM
gmayor's Avatar
gmayor gmayor is offline how to check for duplicated words / cells ? Windows 7 64bit how to check for duplicated words / cells ? Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,106
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

The burning question is why are you using Word to create a 'database', when Excel will do the job so much better and will make it easier to spot the duplicates you fear?
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 05-02-2015, 03:21 AM
iSlam Khaled iSlam Khaled is offline how to check for duplicated words / cells ? Windows 8 how to check for duplicated words / cells ? Office 2013
Novice
how to check for duplicated words / cells ?
 
Join Date: May 2015
Posts: 7
iSlam Khaled is on a distinguished road
Default

Quote:
Originally Posted by gmayor View Post
The burning question is why are you using Word to create a 'database', when Excel will do the job so much better and will make it easier to spot the duplicates you fear?

I prefer using word than exel because it isn't only databases what i do , i am writing full documents with tables ,charts ,pictures and paragraphs . So word is the best for my work .
Reply With Quote
  #4  
Old 05-02-2015, 01:39 PM
iSlam Khaled iSlam Khaled is offline how to check for duplicated words / cells ? Windows 8 how to check for duplicated words / cells ? Office 2013
Novice
how to check for duplicated words / cells ?
 
Join Date: May 2015
Posts: 7
iSlam Khaled is on a distinguished road
Default

isn't there any help ! :-(
Reply With Quote
  #5  
Old 05-02-2015, 09:21 PM
Guessed's Avatar
Guessed Guessed is offline how to check for duplicated words / cells ? Windows 7 32bit how to check for duplicated words / cells ? Office 2010 32bit
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

There is plenty of help but you haven't described adequately what you want to do. Be specific about your problem and perhaps post a sample document.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #6  
Old 05-03-2015, 11:04 AM
iSlam Khaled iSlam Khaled is offline how to check for duplicated words / cells ? Windows 8 how to check for duplicated words / cells ? Office 2013
Novice
how to check for duplicated words / cells ?
 
Join Date: May 2015
Posts: 7
iSlam Khaled is on a distinguished road
Default

Quote:
Originally Posted by Guessed View Post
There is plenty of help but you haven't described adequately what you want to do. Be specific about your problem and perhaps post a sample document.
Here's what i want
http://oi62.tinypic.com/nygoyv.jpg

Is there any option in word to highlight duplicated words ?
Reply With Quote
  #7  
Old 05-03-2015, 03:58 PM
Guessed's Avatar
Guessed Guessed is offline how to check for duplicated words / cells ? Windows 7 32bit how to check for duplicated words / cells ? Office 2010 32bit
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

There is no built-in option in Word to highlight duplicate 'words'. There is in Excel but you already discounted that suggestion earlier.

It appears that you are not actually looking for duplicate words but appear to be looking for duplicate cell contents.

We probably need to assume that you don't need to find multiple dose sizes (as alluded to by the contents of the first row) and that the first column of numbers is manually entered rather than being autonumbers, then a macro based on the following principles would do the job.

1. Sort the table based on column 2
2. Query the cell contents in column 2 and highlight the cells where the cell contents match the cell above.
3. Re-sort the table based on column 1 to get the table back in the original order
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #8  
Old 05-04-2015, 03:59 AM
iSlam Khaled iSlam Khaled is offline how to check for duplicated words / cells ? Windows 8 how to check for duplicated words / cells ? Office 2013
Novice
how to check for duplicated words / cells ?
 
Join Date: May 2015
Posts: 7
iSlam Khaled is on a distinguished road
Default

Quote:
Originally Posted by Guessed View Post
There is no built-in option in Word to highlight duplicate 'words'. There is in Excel but you already discounted that suggestion earlier.

It appears that you are not actually looking for duplicate words but appear to be looking for duplicate cell contents.

We probably need to assume that you don't need to find multiple dose sizes (as alluded to by the contents of the first row) and that the first column of numbers is manually entered rather than being autonumbers, then a macro based on the following principles would do the job.

1. Sort the table based on column 2
2. Query the cell contents in column 2 and highlight the cells where the cell contents match the cell above.
3. Re-sort the table based on column 1 to get the table back in the original order
That's already what i do but i asked for simple way to do this !
Thank you very much for your help
Reply With Quote
  #9  
Old 05-04-2015, 07:28 AM
gmayor's Avatar
gmayor gmayor is offline how to check for duplicated words / cells ? Windows 7 64bit how to check for duplicated words / cells ? Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,106
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

There is no simple alternative while you use Word, but you can automate it with a macro that performs the steps e.g.

Code:
Sub CheckDuplicates()
Dim oTable As Table
Dim oCell1 As Range, oCell2 As Range
Dim i As Long
    If Not Selection.Information(wdWithInTable) Then
        Beep
        MsgBox "The cursor is not in a table?"
        GoTo lbl_Exit
    End If
    Set oTable = Selection.Tables(1)
    oTable.Sort ExcludeHeader:=False, FieldNumber:="Column 2", _
                SortFieldType:=wdSortFieldAlphanumeric, SortOrder:=wdSortOrderAscending
    DoEvents
    For i = 2 To oTable.Rows.Count - 1
        Set oCell1 = oTable.Rows(i).Cells(2).Range
        oCell1.End = oCell1.End - 1
        Set oCell2 = oTable.Rows(i + 1).Cells(2).Range
        oCell2.End = oCell2.End - 1
        If oCell1.Text = oCell2.Text Then
            oCell1.HighlightColorIndex = wdYellow
            oCell2.HighlightColorIndex = wdYellow
        End If
    Next i
    oTable.Sort ExcludeHeader:=False, FieldNumber:="Column 1", _
                SortFieldType:=wdSortFieldNumeric, SortOrder:=wdSortOrderAscending
lbl_Exit:
    Set oTable = Nothing
    Set oCell1 = Nothing
    Set oCell2 = Nothing
    Exit Sub
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #10  
Old 05-04-2015, 11:05 AM
iSlam Khaled iSlam Khaled is offline how to check for duplicated words / cells ? Windows 8 how to check for duplicated words / cells ? Office 2013
Novice
how to check for duplicated words / cells ?
 
Join Date: May 2015
Posts: 7
iSlam Khaled is on a distinguished road
Default

Quote:
Originally Posted by gmayor View Post
There is no simple alternative while you use Word, but you can automate it with a macro that performs the steps e.g.

Code:
Sub CheckDuplicates()
Dim oTable As Table
Dim oCell1 As Range, oCell2 As Range
Dim i As Long
    If Not Selection.Information(wdWithInTable) Then
        Beep
        MsgBox "The cursor is not in a table?"
        GoTo lbl_Exit
    End If
    Set oTable = Selection.Tables(1)
    oTable.Sort ExcludeHeader:=False, FieldNumber:="Column 2", _
                SortFieldType:=wdSortFieldAlphanumeric, SortOrder:=wdSortOrderAscending
    DoEvents
    For i = 2 To oTable.Rows.Count - 1
        Set oCell1 = oTable.Rows(i).Cells(2).Range
        oCell1.End = oCell1.End - 1
        Set oCell2 = oTable.Rows(i + 1).Cells(2).Range
        oCell2.End = oCell2.End - 1
        If oCell1.Text = oCell2.Text Then
            oCell1.HighlightColorIndex = wdYellow
            oCell2.HighlightColorIndex = wdYellow
        End If
    Next i
    oTable.Sort ExcludeHeader:=False, FieldNumber:="Column 1", _
                SortFieldType:=wdSortFieldNumeric, SortOrder:=wdSortOrderAscending
lbl_Exit:
    Set oTable = Nothing
    Set oCell1 = Nothing
    Set oCell2 = Nothing
    Exit Sub
End Sub
Thanks alot for help .
But how can i use this ?
Reply With Quote
  #11  
Old 05-04-2015, 10:18 PM
gmayor's Avatar
gmayor gmayor is offline how to check for duplicated words / cells ? Windows 7 64bit how to check for duplicated words / cells ? Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,106
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

See http://www.gmayor.com/installing_macro.htm

Then insert the cursor in the table and run the macro.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #12  
Old 05-05-2015, 08:07 PM
iSlam Khaled iSlam Khaled is offline how to check for duplicated words / cells ? Windows 8 how to check for duplicated words / cells ? Office 2013
Novice
how to check for duplicated words / cells ?
 
Join Date: May 2015
Posts: 7
iSlam Khaled is on a distinguished road
Default

Quote:
Originally Posted by gmayor View Post
See http://www.gmayor.com/installing_macro.htm

Then insert the cursor in the table and run the macro.
Thank you alot .
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to check for duplicated words / cells ? Adding words to spell check dictionary oakwoodbank Word 17 02-27-2015 08:09 PM
how to check for duplicated words / cells ? Check for duplicated data and print list cjharley Excel 2 12-19-2014 11:44 PM
Words are being duplicated in text boxes argentraven PowerPoint 0 07-24-2014 03:10 PM
how to check for duplicated words / cells ? Spell check adding words riweir Word 3 11-30-2011 09:03 PM
Words are duplicated on print agentred Word 1 06-29-2010 08:45 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:18 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft