Aladin - Help!


Posted by Brian on January 15, 2002 7:10 PM

Aladin,

The other night you helped me with a sumif formula. I have since expanded the formula to fit my needs. This was the formula:]
=SUMIF('[vacation calendar.xls]jan.'!$A$1:$A$100,A2,'[vacation calendar.xls]jan.'!$B$1:$B$100)

I've changed A2 to "employee name" and A1:A100 to A1:H100. I have names in column B and G with hours in C and H respectively. I haven't changed the second part of the formula. The formula does what I want it to do, but what does the second part do? The B1:B100. The formula adds hours in column C and H correctly.

Brian



Posted by Aladin Akyurek on January 16, 2002 1:40 AM

SUMIF formula

Hi Brian --

The syntax of SUMIF is:

SUMIF(Range1,Condition,Range2)

where all cells in Range2 that corresond to cells in Range1 for which Condition hold are summed up. Note that Range1 and Range2 can be the same: The syntax is then shortened to:

SUMIF(Range,Condition)

The formula (supposed to be entered in a sheet where you have employee names from A2 on in your master workbook -- see your original post)

=SUMIF('[vacation calendar.xls]jan.'!$A$1:$A$100,A2,'[vacation calendar.xls]jan.'!$B$1:$B$100)

says: Sum up all cells in '[vacation calendar.xls]jan.'!$B$1:$B$100 that corresond to cells in '[vacation calendar.xls]jan.'!$A$1:$A$100 which have a value equal to the value in A2.

What you say, I quote,

> I've changed A2 to "employee name" and A1:A100 to A1:H100. I have names in column B and G with hours in C and H respectively. I haven't changed the second part of the formula. The formula does what I want it to do, but what does the second part do? The B1:B100. The formula adds hours in column C and H correctly.

is a bit confusing to me.

Would you perhaps post the expanded formula?

Aladin

============