vikishah

New Member
Joined
Oct 24, 2018
Messages
4
Hello,
My file has company codes(CoCd) in col's and Profit centers(PC) in rows, with $'s assigned to them. I need to retrieve $'s specific to a PC and CoCd combination. Issue is sometimes same CoCds are in multiple columns. So can't do a simple sumif or Hlookup.

E.g.
B30 PC0001
B31 PC0002
B32 PC0003

C29 CoCd1
D29 CoCd2
E29 CoCd1
F20 CoCd3

I need to get the $'s that are assigned to a combination of PC/CoCd.
Please advise. Thank you.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Try:

ABCDEF
26PCPC0002
27CoCdCoCd1
28Total10
29CoCd1CoCd2CoCd1CoCd3
30PC000114710
31PC000225
8
11
32PC000336912

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet3

Worksheet Formulas
CellFormula
B28=SUMPRODUCT(C30:F32*(B30:B32=B26)*(C29:F29=B27))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
Thank you Eric. But I am getting an N/A using SUMPRODUCT(C30:F32*(B30:B32=B26)*(C29:F29=B27)).
Am I missing something?

Try:

ABCDEF
26PCPC0002
27CoCdCoCd1
28Total10
29CoCd1CoCd2CoCd1CoCd3
30PC000114710
31PC000225811
32PC000336912

<tbody>
</tbody>
Sheet3

Worksheet Formulas
CellFormula
B28=SUMPRODUCT(C30:F32*(B30:B32=B26)*(C29:F29=B27))

<tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
I'm not sure what to tell you. I get a 0 if one of the values in B26:B27 don't match, and a #VALUE if I put non-numeric data in the table somewhere. Blank entries are OK. I can't create a #N/A. Make sure that your ranges are correct, and that there's valid data in your ranges. Make sure that the formula is written properly. What version of Excel are you using?
 
Upvote 0

Forum statistics

Threads
1,214,826
Messages
6,121,795
Members
449,048
Latest member
greyangel23

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