Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

generate sequence like values from a column that generate the same sequence-value for the same column-value

$
0
0

I know, the title is an absolute desaster, but I dont know how to describe what I want with just a few words :(

Assume that I have the following table:

column acolumn b
871
112
871
103
38314
67325415
77196
871
112

The first column is the data where I want to improve readability. To be more precise, readability in case of duplicate values but distinguish between different values. The numbers there can be quite large (eight digits) but its not a sequence, so there can (and will) be gaps as the example shows. I am looking for a way to transform the values from column a to a sequence starting with 1 where the same value of column a gets the same value in column b. Sounds strange, but I dont know how to explain it better.

Example:

  • The value 87 (1st, 3rd and 8th row) in column a gets value 1 in column b
  • The value 11 (2nd and 9th row) gets value 2 in column b
  • All other values in column a are unique and therefore their values in column b are unique too. In the best case, the unqiue values in column a wouldnt even get a value in column b at all.

Preferably without scripting because there are multiple users on the sheet and most of them have no coding/scripting experince.


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>