count - Select Last of each ID in Excel -


i have table in excel multiple map units, , value corresponding each map unit. map units listed multiple times, , want last value each map unit selected.

for example:

mapunit = 1 ; value = 2

mapunit = 1 ; value = 4

mapunit = 1 ; value = 1

map unit =2 ; value = 3

mapunit=2 ; value = 4

mapunit = 3; value = 2

mapunit = 4; value =1

mapunit = 4; value = 5

and want output like:

mapunit =1 ; value = 1

mapunit = 2; value = 4

mapunit =3 ; value = 2

mapunit =4 ; value = 5

is there formula in excel or sql query this?

thank you!

ok, think should work. assumptions cells reference above in a1:b9 (with column headers in row 1) , i'm putting unique mapunit numbers in column e , formulas going column f.

=index(offset($b$1,match(e2,$a$2:$a$9,0),0,countif($a$2:$a$9,e2),1),countif($a$2:$a$9,e2)) 

please let me know if need clarification.

edit:

in case list of unique mapunit values longer, can make list copying original column , doing remove duplicates operation.


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -