我对 VBA 完全陌生(除了手动录制和运行),所以希望有人可以帮助我设计这个。我有一个基于日期和类型的工作表,其中每个唯一 ID(A 列)的行数未指定。:
A B C D
1 12Jan2010 type A Person1
1 16Jan2010 type B Person1
2 06Dec2009 type A Person2
3 16Dec2009 type A Person1
5 20Dec2009 type A Person2
5 02Jan2010 type B Person2
4 10Dec2009 type A Person2
基于唯一 ID,我想将此数据转换为每个唯一 ID 1 行,然后将所有日期值按时间顺序排列在行中,如下所示:
A B C D
1 Person1 12Jan2010(A) 16Jan2010(B)
2 Person2 06Dec2009(A)
3 Person1 16Dec2009(A)
4 Person2 10Dec2009(A)
5 Person2 20Dec2009(A) 02Jan2010(B)
有没有办法可以在宏中完成这项工作?