要将行遍历到列中

时间:2014-06-27 10:46:14

标签: excel vba

我有三列(App,Ticket,Efforts)。任务是分离在A列(App)中意外添加的用户名,并将其应用于新列(D列)。数据如下。

App           Ticket    Efforts

James, lijo     

App1          23    13

App2          44    22

App3          55    33

Tom, Cruise     

App2          44    22

App1          33    42



Output Expected :


App Ticket  Efforts ColumnD

App1    23  13    James, Lijo

App2    44  22    James, Lijo

App3    55  33    James, Lijo

App2    44  22    Tom, Cruise

App1    33  42    Tom, Cruise

1 个答案:

答案 0 :(得分:0)

将此公式粘贴在D3中并将其向下拖动到最后一行

=IF(ISNUMBER(B2),IF(B3<>"",D2,""),A2)

enter image description here