Looking to find prices based on unique customer ID

saltoftheearth

New Member
Joined
Feb 29, 2020
Messages
6
Office Version
  1. 365
  2. 2019
Platform
  1. MacOS
Hello all!

I am working with some salesforce data and am looking to find specific information for customers that have made multiple purchases.

I have attached a sample worksheet that has random data but it should portray the issue I'm trying to solve! A few things to note:

  • Each customer has customer ID (in theory one customer could have more than one, but for the most part it will just be one)
  • One customer ID can have multiple product line IDs
  • Each product line ID will have a sale price
  • On the summary tab in the attached excel file, I am looking to reference the account IDs on the second tab and match up the sales price to the customer ID.
    • If one of the customer IDs has multiple product lines with the same product, the summary tab should pull the lowest of those values
  • Ignore the formulas, I just generated random numbers
Please let me know what other information I can provide. Really do appreciate all the help you all provide!

Summary tab

Sample Sheet.xlsx
ABCDEF
1Customer IDProduct 1Product 2Product 3Product 4Product 5
267
3382
4124
5177
6213
77
817
9304
10112
11208
1254
1382
14344
15347
16388
1713
18173
19358
2084
21305
Summary
Cell Formulas
RangeFormula
A2A2=IFERROR(__xludf.DUMMYFUNCTION("unique(Sheet1!A2:A1000)"),67)
A3A3=IFERROR(__xludf.DUMMYFUNCTION("""COMPUTED_VALUE"""),382)
A4A4=IFERROR(__xludf.DUMMYFUNCTION("""COMPUTED_VALUE"""),124)
A5A5=IFERROR(__xludf.DUMMYFUNCTION("""COMPUTED_VALUE"""),177)
A6A6=IFERROR(__xludf.DUMMYFUNCTION("""COMPUTED_VALUE"""),213)
A7A7=IFERROR(__xludf.DUMMYFUNCTION("""COMPUTED_VALUE"""),7)
A8A8=IFERROR(__xludf.DUMMYFUNCTION("""COMPUTED_VALUE"""),17)
A9A9=IFERROR(__xludf.DUMMYFUNCTION("""COMPUTED_VALUE"""),304)
A10A10=IFERROR(__xludf.DUMMYFUNCTION("""COMPUTED_VALUE"""),112)
A11A11=IFERROR(__xludf.DUMMYFUNCTION("""COMPUTED_VALUE"""),208)
A12A12=IFERROR(__xludf.DUMMYFUNCTION("""COMPUTED_VALUE"""),54)
A13A13=IFERROR(__xludf.DUMMYFUNCTION("""COMPUTED_VALUE"""),82)
A14A14=IFERROR(__xludf.DUMMYFUNCTION("""COMPUTED_VALUE"""),344)
A15A15=IFERROR(__xludf.DUMMYFUNCTION("""COMPUTED_VALUE"""),347)
A16A16=IFERROR(__xludf.DUMMYFUNCTION("""COMPUTED_VALUE"""),388)
A17A17=IFERROR(__xludf.DUMMYFUNCTION("""COMPUTED_VALUE"""),13)
A18A18=IFERROR(__xludf.DUMMYFUNCTION("""COMPUTED_VALUE"""),173)
A19A19=IFERROR(__xludf.DUMMYFUNCTION("""COMPUTED_VALUE"""),358)
A20A20=IFERROR(__xludf.DUMMYFUNCTION("""COMPUTED_VALUE"""),84)
A21A21=IFERROR(__xludf.DUMMYFUNCTION("""COMPUTED_VALUE"""),305)



Raw Data

Sample Sheet.xlsx
ABCD
1Customer IDProduct line IDProduct NameSale Price
23091234Product 1$85.00
31371234Product 2$96.00
43681234Product 3$105.00
53021234Product 2$85.00
629123Product 1$69.00
7200123Product 2$96.00
8257123Product 3$73.00
960123Product 2$77.00
10389123Product 2$72.00
1116456Product 2$108.00
1290456Product 2$63.00
13142456Product 4$101.00
14177456Product 4$78.00
15247456Product 4$63.00
16225789Product 1$79.00
17118789Product 1$61.00
18153789Product 2$66.00
19363789Product 2$68.00
20309102Product 3$50.00
21295102Product 3$82.00
Raw Data
Cell Formulas
RangeFormula
A2:A21A2=RANDBETWEEN(1,400)
D2:D21D2=RANDBETWEEN(50,110)
 
Hi Dear,

Please check the below:

Book1
ABCDEF
1Customer IDProduct 1Product 2Product 3Product 4Product 5
239859    
3316 75   
467  65  
516 102   
635289    
7291 107   
83  70  
9293 64   
10127 93   
1114 109   
12333 70   
13292   76 
1475   92 
1515   60 
16173103    
1731997    
1856 102   
19148 86   
20220  65  
2173  69  
Summary
Cell Formulas
RangeFormula
A2:A21A2=UNIQUE('Raw Data'!A2:A21)
B2:F21B2=IFERROR(MIN(FILTER('Raw Data'!$D$2:$D$21,(Summary!$A$2#='Raw Data'!$A2)*('Raw Data'!$C$2:$C$21=Summary!B$1))),"")
Dynamic array formulas.


Book1
ABCD
1Customer IDProduct line IDProduct NameSale Price
23981234Product 159
33161234Product 275
4671234Product 365
5161234Product 2102
6352123Product 189
7291123Product 2107
83123Product 370
9293123Product 264
10127123Product 293
1114456Product 2109
12333456Product 270
13292456Product 476
1475456Product 492
1515456Product 460
16173789Product 1103
17319789Product 197
1856789Product 2102
19148789Product 286
20220102Product 365
2173102Product 369
Raw Data


Regards
M.Yusuf
 
Upvote 0
Hello there!

Appreciate you following up on my question. I tried the formula you referenced, but it did not seem to work. Were you able to have the values pull over correctly when you ran it?
 
Upvote 0
Hello there!

Appreciate you following up on my question. I tried the formula you referenced, but it did not seem to work. Were you able to have the values pull over correctly when you ran it?
Yes, indeed. The formulas work with Office 365, which I assume you have on your computer as indicated in your profile.

I have uploaded a file on my Google Drive, you can download it and check the workings and adjust accordingly.

Best Regards
M.Yusuf
 
Upvote 0
Thank you! I am taking a look now

So in the second row on the summary tab, The customer ID shows 398 but the product 1 column is blank. If I look at the raw data tab, customer ID 398 has product 1 with a sale price of 59 but it is not showing in the summary sheet for some reason
 
Upvote 0
If pasting the formula doesn't load the sale price of 59 (cell remains blank), open the formula edit bar and click enter. It should show the result and you can drag it to the rest of the cells.
 
Upvote 0

Forum statistics

Threads
1,226,848
Messages
6,193,315
Members
453,790
Latest member
yassinosnoo1

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