Sumif from another worksheet

Savaal

New Member
Joined
May 24, 2011
Messages
4
I have searched feverishly for the answer, but can't seem to figure this issue out. I have a worksheet with data for sales for our company. I need to total only the subtotals in column E, which crystal reports puts in the same column as the line items that are sold. I want to parse out the bolded and underlined items in a column and put the total on another worksheet, presumably cell A2.

I have tried many variations on this using native functions in excel, and now have looked into writing a vba script to do this, but can't seem to get a handle on the complication. I am not even sure where I should put the script, in Sheet2, or in workbook. Anyway, please help!!!

Here is the formula I have tried recently.

This code in sheet2, cell A2 doesn't seem to work. Since there is data in row G that specifies quantity, I figured I would try it this way, since the data is numeric, I would do a check against the quantity field instead, but it only totals the first one in the list. There are spaces in the list, and I worry that is messing this up.

Code:
=DSUM(Sheet1!E:G,Sheet1!E:E,Sheet1!G:G>0)

I have also tried to do a sum based on the IsNumber and isNonText functions, but still get no luck. Thanks everyone!!!

S
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
A B
01 Invoiced $ Shipped Date
02 285.50 05/18/2011
03 285.50 Part Total
04
05 185.90 05/18/2011
06 185.90 Part Total
07 291.90 05/18/2011
08 291.90 Part Total
09
10 519.75 05/06/2011
11 519.75 05/04/2011
12 1,039.50 Part Total



On Sheet2, A2, I want $1802.80, which is the total of A3, 6, 8, and 12

S
 
Upvote 0
A B
01 Invoiced $ Shipped Date
02 285.50 05/18/2011
03 285.50 Part Total
04
05 185.90 05/18/2011
06 185.90 Part Total
07 291.90 05/18/2011
08 291.90 Part Total
09
10 519.75 05/06/2011
11 519.75 05/04/2011
12 1,039.50 Part Total



On Sheet2, A2, I want $1802.80, which is the total of A3, 6, 8, and 12

S

=SUMIF($B$2:$B$12,"Part Total",$A$2:$A$12)

Prefix the sheet name if needed.
 
Upvote 0
Thanks. I don't know why you need the dollar sign, but it works. Would you be willing to tell me why those are needed? Thanks again!

S
 
Upvote 0
Thanks. I don't know why you need the dollar sign, but it works. Would you be willing to tell me why those are needed? Thanks again!

S
They're only needed if you're copying the formula to other locations.

The dollar signs $ "lock" the row and/or column ranges so that they won't change when copying the formula.

Look in Excel help for "About cell and range references".
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,738
Members
452,940
Latest member
Lawrenceiow

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top