Generate Unique ID based on multiple related rows

dtaylor646

New Member
Joined
Jun 12, 2018
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Hello Everyone,

To aggregate data in a file, I need to created a unique ID to perform aggregate calculations. What I have is a unique list from column (B) of Loan IDs, and associated loans written in column (D). When there is more than one related loan, it has a comma between the two loan id's. I imagine I first want to split column (D) into (D) and (E)...but then how can I create a formula to generate a 'Generated ID' to unrelated rows...while populating the same 'Generated ID' to the related rows? Below is an example of desired result in (A).

Thanks for any and all help!

(A) Generated ID(B) Loan (unique)(C) Loan Name(D) Related loan1Related loan2
1001Loan #1
1012Loan #2
1023Loan #3
1034Loan #49
1045Loan #5
1056Loan #6
1067Loan #7
1078Loan #8
1039Loan #94
10910Loan #10
11011Loan #1114, 15
11112Loan #12
11213Loan #13
11014Loan #1411, 15
11015Loan #1511, 14
11516Loan #16
11617Loan #17
11718Loan #1819
11719Loan #1918
11920Loan #20
Might want to split (D) here
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Oh, I may have found one solution. If I move the "Generated ID" to column (F), I think this works.

=IF(ISNA(VLOOKUP(A2,$E$2:F2,2,0)),IF(ISNA(VLOOKUP(A2,$D$2:F2,3,0)),100+ROWS($F$2:F2),VLOOKUP(A2,$D$2:F2,3,0)),VLOOKUP(A2,$E$2:F2,2,0))

Does anyone know if I can have the "Generated ID" moved to (A)?
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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