Hi Robert
The formula I gave you will do just that.
It is saying look at the name in A1, and see if it occurs within the
list customers. If it does it will return a 1, if not a 0.
It then looks a the entry in B1 and looks it if occurs within the list
products. If it does it will return a 1, if not a 0.
It then multiplies this by the percentage in D1
Finally, this value is multiplies by the value in C1.
So if customer is true, value =1
If product is true value =1
1 * 1 * 10% =10%
C1 * 10% is the result in column E
If either customer returns False, or product returns false, then
0 * 1 * 10% = 0%
1 * 0 * 10% = 0%
so there will be no value in Column E
Extend the named range Customers to cells H1:H5 and enter those 5
customers names in the 5 cells.
Copy the formula down column E
The total of column E is what you want.
If your not sure how to create a named range.
Mark the range e.g. H1:H5
in the white pane to the left of column A and above row 1 type
Customers. Hit return.
Repeat with I1:I2 and call it Products
I can't see any attached sample, and attaching files to postings in
these NG's is not allowed.
It would be possible to do the whole sum with a SUMPRODUCT formula, but
its just after midnight here in the UK and I'm off for some sleep.
You can get your answer by copying my formula down column E and summing
it, but someone else may come up with a single Sumproduct for you.
Cheers.
--
Regards
Roger Govier
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thanks Roger,
>
> I'm not sure if what you're talking about will solve my need, so let
> me try and be more specific (sorry for not being more so the first
> time):
>
> I want to multiply the sale price by the support percentage ONLY when:
>
> - 4 or 5 SPECIFIC customers out of the 150 unique customers I have
> are identified in column A AND
>
> - when "software" or "support" out of the 11 different sale types are
> specified in column B
>
> It might read like this:
>
> I have 1000 orders that is detailed to the line item level in a
> spreadsheet. I have 150 unique customer names in column A. I have 11
> unique order types column B. 4 or 5 of my customers bundle the first
> year of support in with the initial product purchase (therefore, there
> isn't a separate and distinct line item for first year of support). I
> want to measure my support potential. To do that, I want to add all
> the line items that are identified as "1st year", PLUS a percentage of
> the orders that are for those 4 or 5 customers.
>
> In the attached sample, I want to multiply the sale price times the
> percentage for Me, You, and Us when the Product Type is either
> Software or Support.
>
> What do you think?
>
> On Sun, 8 Jan 2006 22:37:21 -0000, "Roger Govier"
> <(E-Mail Removed)> wrote:
>
>>Hi Robert
>>
>>I made a named range in H1:H3 called Customers and filled it with
>>customer a, customer b etc.
>>I made a named range in I1:I2 called products and filled it with
>>software and support
>>In cell E1
>>=(COUNTIF(customers,A1)*COUNTIF(products,B1)*D1)*C1
>>
>>If you make the named ranges dynamic, then you can enter any number of
>>customers into the range. Similarly with products
|