Does Word have something like SUMIF in Excel?

T

tj3993

I'm trying to sum a table column based on information contained in another
column. Does Word have a function similar to the SUMIF function in Excel?
 
J

Jean-Guy Marcil

tj3993 was telling us:
tj3993 nous racontait que :
I'm trying to sum a table column based on information contained in
another column. Does Word have a function similar to the SUMIF
function in Excel?

No. But you can build an IF field that would work. Nested IF fields are
allowed in Word, just as in Excel.


{IF {SUM(abc)}= 123 "Output this" "Else output this"}
or
{IF [This]= "That" "{SUM(abc)}" "Else output this"}
etc.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
G

Greg Maxey

I don't think so. You can use cell ranges in forumlat fields. For example,
say you want to sum column a rows 1 trough 5 in cell b1.

In b1, put the field {=sum(a1:a5)}
 
T

tj3993

Merci. I understand what you wrote, but I'm not sure how to apply it to what
I am doing.

Here is what I am trying to do.

I have rows of items that are categorized (for argument, let's call them
"A", "B", and "C"). I want to create totals by category. In Excel, to sum
all records in Category "A" I would type:

=SUMIF(B1:B100, "A", C1:C100),

where B1:B100 contains the category for each record and C1:C100 contains the
value for each record.

Is this possible to do?
 
G

Graham Mayor

Why don't you simply perform your calculations in Excel and paste the link
from Excel into Word?

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
M

macropod

Hi tj,

Word doesn't have anything equivalent to a SUMIF function, though you could
build up an approximation for testing numeric values via something like:
{=IF(B1>4,C1,0)+IF(B2>4,C2,0)+IF(B3>4,C3,0)+IF(B4>4,C4,0)}

However, I note that you're possibly trying to test whether the data in
Column B is a letter (or alhpa-numeric string). The standard column & row
cell referencing does not work with text strings, including dates and other
mixed alpha-numeric character strings. To refer to a character string in a
cell, the character strings (not the cells) must be individually bookmarked
and the bookmarks referred to in the formula. For what you're trying to do,
this might be a lot of work - a macro (or a link to an Excel workbook with
the SUMIF implementation) would be far better.

Cheers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top