Forum Discussion

lvottiernct's avatar
lvottiernct
Copper Contributor
May 06, 2024
Solved

need to get a random number for each different names on my spreadsheet (same name can appear twice)

Hello, I am looking for a bit of help here as i am still learning my way into excel. I have this list of people that i need to transform into random numbers for anonymization reasons. i thought of...
  • Martin_Angosto's avatar
    May 06, 2024

    lvottiernct 

     

    Hello! You can use this:

     

    =HSTACK(UNIQUE(B3:B11),INDEX(UNIQUE(RANDARRAY(ROWS(UNIQUE(B3:B11)),1,0,1000000,TRUE)),SEQUENCE(ROWS(UNIQUE(B3:B11)),1)))

     

    Change range B3:B11 with the actual range of your names. It will create an array with all unique names with a random integer number next to each one.

Resources