Given your input:
awk ' NR == 1 {print; next} { split($1,a,/-/) sep = values[a[1]] == "" ? "" : "," values[a[1]] = values[a[1]] sep $2 } END {for (key in values) print key, values[key]} '
produces
ID: Value: a 49,75 b 120,150,211 c 289 d 301,322
A language that supports "hash lists" will also be convenient. Here is the version of perl
perl -lne ' if ($. == 1) {print; next} if (/^(.+?)-\S+\s+(.*)/) { push @{$values{$1}}, $2; } END { $, = " "; foreach $key (keys %values) { print $key, join(",", @{$values{$key}}); } } '
source share