Conditional Lookup Question

godeacs

New Member
Joined
Dec 15, 2006
Messages
9
Hi All,

I have a spreadsheet with 5 Columns:
A: Customer
B: Contract
C: Sales
D: Type
E: Count

In this sheet, Sales (Col C) and Type (Col D) are mapped to Contract (Col B). The issue is that Sales and Type are pulled from different databases and thus do not match up exactly with Contract. For example, there's a case where the same Contract has two Types and thus double counts Sales. For instances where this occurs, I would like to allocate the Sales based on the Count (Col E).

Here's a shot of what the sample sheet looks like. I can send it to someone if you're willing to take a look.
sample.xls
ABCDEF
1CustomerContractSalesTypeCountComment
2ABC11654$100,000.00A60,000
3CDG13130$60,000.00A1,000
4ADFA11670$22,222.00A70,000,000
5BFI11808$333,333.00A123,423
6BFI12871$10,000.00B23,122Inthiscase,the$10,000.00isdoublecountedforBFIContract12871.Tocorrectthis,Iwouldliketoallocatethe$10,000.00basedonthe%ofCountforeachType(23,122/(23,122+7,777,777))
7BFI12871$10,000.00A7,777,777Isthereaneasywaytodothiswithaformula,soIdon'thavetodoitmanually.Theactualspreadsheethas2600rows.
8MBS10661$8,000,000.00A100
9MBS11627$3,838.00A20,000
10CSSS12667$9,992.00B300
11CSSS12696$2,000.00A444
12CSSS12696$2,000.00B44,444
13CSSS12703$3,333.00B1,111
14CSSS12718$11.00B222,222
15CSSS12756$48,394,873.00A9,999,999
16CSSS12796$34,938.00B33,333
17CCC11757$924,785.00A2,349,767
18CCC11824$2,945.00A454,389
19CCC11889$5,000.00B1,111
20CCC11889$5,000.00C99,999
21CCC11889$5,000.00C100,000
22CCC12013$3,433.00B3,432
23CCC12042$98,978.00B999
24CCC12049$793,874.00B100,000
Sample


Thanks in advance for any help![/img]
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Try...

F2, copied down:

=C2*E2/SUMIF($B$2:$B$24,B2,$E$2:$E$24)

Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,215,995
Messages
6,128,180
Members
449,430
Latest member
sadielynn7

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