Technology Questions

Go Back   Technology Questions > Software Questions > General Questions > Microsoft Office

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 11-06-2007, 06:10 PM
teresa
Newsgroup Contributor
 
Posts: n/a
formula

i have been trying to get the total from other spreadsheet under 2 particular
code

for example:

Spreadsheet 1

Col A Col D Col F
ABC A 125
ABC A 25
ABC B 100
ABC B 20
ABD A 50
ABD A 50
ABD B 170
ABD B 30

Spreadsheet 2

Col A Col A Col B

ABC 150 120
ABD 100 200


I used formula

=SUM((TB!$B$2:$B$4900=$A2),(TB!$D$2:$D$4900="M"),( TB!$I$2:$I$4900))

but the result is 0. Please help solve this, thanks

Teresa
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 11-06-2007, 06:10 PM
  #2 (permalink)  
Old 11-07-2007, 12:00 PM
JLatham
Newsgroup Contributor
 
Posts: n/a
RE: formula

Teresa, Your use of column IDs in the example is a bit confusing, you show
Col A, D and F on first sheet, then on 2nd sheet column A twice?? Also, we
don't knkow which sheet is TB?

But, I think this will will help anyhow, just apply to the proper sheets/
ranges:

=SUMIF(TB!$B$2:$B$4900,$A2) + SUMIF(TB!$D$2:$D$4900,"M")
But at this point I'm confused about the final reference to Column I - as
you have no test parameter.

Now, if you are trying to add the values in that 3rd column (I) based on a
match of both of the first 2 criteria matching, then what you need is to use
the SUMPRODUCT() function as:

=SUMPRODUCT(--(TB!$B$2:$B$4900=$A2),--(TB!$D$2:$D$4900="M"),(TB!$I$2:$I$24900))

What that will do is that the first two tests will return either 1 (true) or
0 (false) as written, and it will take those two values and multiply them
times the value in column I of each row. 1 * 1 * anyValue = anyValue, but if
either is false then you get 1*0*anyValue = 0 (or 0*1*anyValue=0).

If this doesn't clear things up for you, I suggest you drop in over at the
Excel Worksheet Functions group and ask the question again. Although if you
ask for more help in this discussion, I'll keep my eye on it and will respond
here.

JLatham
MVP (Excel)

"teresa" wrote:

> i have been trying to get the total from other spreadsheet under 2 particular
> code
>
> for example:
>
> Spreadsheet 1
>
> Col A Col D Col F
> ABC A 125
> ABC A 25
> ABC B 100
> ABC B 20
> ABD A 50
> ABD A 50
> ABD B 170
> ABD B 30
>
> Spreadsheet 2
>
> Col A Col A Col B
>
> ABC 150 120
> ABD 100 200
>
>
> I used formula
>
> =SUM((TB!$B$2:$B$4900=$A2),(TB!$D$2:$D$4900="M"),( TB!$I$2:$I$4900))
>
> but the result is 0. Please help solve this, thanks
>
> Teresa

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Implement Formula Ali Microsoft Office 2 07-04-2007 06:00 PM
The Wii Success Formula LPH Console Gaming 0 05-27-2007 08:35 AM
How do I fix my date formula? checkQ Microsoft Office 3 01-15-2007 11:37 AM
Excel 2003 Formula Steve Microsoft Office 1 01-15-2007 11:34 AM
Formula evaluator Scott Pocket PC General 6 01-15-2007 11:05 AM


New To Technology Questions? Do You Need Help with Your Computer or Device? Do You Need Help with this site?

All times are GMT -8. The time now is 12:57 AM.


2003 - 2009 All Rights Reserved. Technology Questions

Search Engine Friendly URLs by vBSEO 3.3.0