LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 86
Default Sum of "everything but me".

I have a sheet of inventory broken down by location. Some items are related
to other items, for instance, there are nuts and bolts that are needed to
fasten girders. We maintain this relationship through the primary IDs in our
associated database; if an item in question has a "underid", then it is
related to some other item. For instance:

thing related to packages items/pack
Girders 10
Bolts Girders 1 10
Nuts Girders 1 10
Hoses 5
Nozzles Hoses 2

The formula I'm trying to write is to make sure that I don't have a
shortfall of any one item at any one location. In the example above, we have
enough nuts and bolts for the girders, but we don't have enough nozzles for
the hoses. So what I need to know is whether or not the quantity of any given
item is enough to "cover" any other related item.

Mathemetically it's (total quant of all related items)-(total quant of this
item) If that number is bigger than zero, we're cool.

Now this looks like something you could do with a SUMPRODUCT, right? Well no
such luck (I think). As you can see, the database is lazy and doesn't put in
default values for items per pack if it's only 1. So I need to put an
ISNULL(quantity,1) in there. Is there a way to do this in SUMPRODUCT?

Then I looked at using just SUM for this, but I can't figure out how this
works. In the SUMPRODUCT help there is a very confusing statement; "The
preceding example returns the same result as the formula SUM(A2:B4*C2:D4)
entered as an array" So I tried a few experiments with SUM, but I can't
figure out what it's doing. I put two columns of four numbers in a sheet and
used =SUM(A1:A4*B1:B4), and the result was simply the value of A*B, it didn't
sum up over the rows. Am I missing something obvious here?

The other problem is the one that really has me stumped. The grouping for
summing up is basically if my underid is in either the first OR second
column. That is, the total is anything that has my underid as its underid, or
anything that has my underid as its ID. The good news is that it's basically
an ISNULL(underid, ID), because we want to use ID only if

Anyone have some suggestions? BTW, the sheet is 1500 rows long, and about 50
columns wide, so major surgery in terms of adding new related columns might
not be easy.

Maury
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
Complex if test program possible? If "value" "value", paste "value" in another cell? jseabold Excel Discussion (Misc queries) 1 January 30th 06 10:01 PM
Insert "-" in text "1234567890" to have a output like this"123-456-7890" Alwyn Excel Discussion (Misc queries) 3 October 25th 05 11:36 PM


All times are GMT +1. The time now is 04:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"