#1   Report Post  
Posted to microsoft.public.word.docmanagement
Neil Neil is offline
external usenet poster
 
Posts: 50
Default Word formula

Hi, I have a word document with a variety of tables in it. I am trying to
count the number of times a string of letters appear. In excel I would simply
select the field and use the countif, but can't do this in word! Can anyone
help please?
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Word formula

Neil wrote:
Hi, I have a word document with a variety of tables in it. I am
trying to count the number of times a string of letters appear. In
excel I would simply select the field and use the countif, but can't
do this in word! Can anyone help please?


If it's Word 2003 or 2007 (maybe XP, I don't remember), you can use the Find
dialog. Put the string of letters in the Find What box and check the option
for "Highlight all items found". Click the Find All button. It will tell you
how many instances it found.

If your version of Word doesn't have the "Highlight all items found" option,
you can simulate it by using the Replace tab of the dialog. Put the string
in the Find What box, and put the code ^& in the Replace With box (that
code means "replace with the same text that was found"). Click the Replace
All button, and you'll get the number of replacements that were made.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.


  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Neil Neil is offline
external usenet poster
 
Posts: 50
Default Word formula

thanks, but i'd like tihe total displayed in the word document so other users
can dynamically see the results, by the way it's office 2003, windows XP

"Jay Freedman" wrote:

Neil wrote:
Hi, I have a word document with a variety of tables in it. I am
trying to count the number of times a string of letters appear. In
excel I would simply select the field and use the countif, but can't
do this in word! Can anyone help please?


If it's Word 2003 or 2007 (maybe XP, I don't remember), you can use the Find
dialog. Put the string of letters in the Find What box and check the option
for "Highlight all items found". Click the Find All button. It will tell you
how many instances it found.

If your version of Word doesn't have the "Highlight all items found" option,
you can simulate it by using the Replace tab of the dialog. Put the string
in the Find What box, and put the code ^& in the Replace With box (that
code means "replace with the same text that was found"). Click the Replace
All button, and you'll get the number of replacements that were made.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.



  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Word formula

Sometimes you just can't get what you want. Word really doesn't have
anything like Excel's countif function.

You can type the number from the Find into the document, and redo it
when necessary. Or you can write a macro to count the occurrences (as
in http://www.word.mvps.org/FAQs/Macros...sTextInDoc.htm) and
place the result into a document property, which can then be displayed
by a DocProperty field. You'd also need a toolbar button or keyboard
shortcut to run the macro, or write the macro so it intercepts a
built-in command such as Print or Save
(http://www.word.mvps.org/FAQs/Macros...SavePrint.htm).

On Wed, 19 Dec 2007 15:09:01 -0800, Neil
wrote:

thanks, but i'd like tihe total displayed in the word document so other users
can dynamically see the results, by the way it's office 2003, windows XP

"Jay Freedman" wrote:

Neil wrote:
Hi, I have a word document with a variety of tables in it. I am
trying to count the number of times a string of letters appear. In
excel I would simply select the field and use the countif, but can't
do this in word! Can anyone help please?


If it's Word 2003 or 2007 (maybe XP, I don't remember), you can use the Find
dialog. Put the string of letters in the Find What box and check the option
for "Highlight all items found". Click the Find All button. It will tell you
how many instances it found.

If your version of Word doesn't have the "Highlight all items found" option,
you can simulate it by using the Replace tab of the dialog. Put the string
in the Find What box, and put the code ^& in the Replace With box (that
code means "replace with the same text that was found"). Click the Replace
All button, and you'll get the number of replacements that were made.


--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word Formula using IF Thomas Tables 22 April 9th 08 12:11 AM
Formula in Word jclplee Tables 1 October 31st 07 01:01 PM
how to align caption of formula right whereas formula itself left Martin van Leeuwen Microsoft Word Help 1 October 22nd 05 06:39 AM
formula in word Cheri Tables 8 July 5th 05 07:27 PM
Word formula - HELP! zSplash Tables 1 June 2nd 05 08:25 PM


All times are GMT +1. The time now is 09:03 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"