[英]Excel — Cell Values Match in First Row, Return Values on One Row with Multiple Columns
Column A: Lists the Address Book Numbers for different companies (1234, 1235, 1236, etc.) A列:列出不同公司的通讯簿编号(1234、1235、1236等)
Column B: Lists the Phone Types (Cell, Fax, Home) B列:列出电话类型(移动电话,传真,家庭电话)
Column C: Lists Company Phone Numbers C列:列出公司电话号码
Address Book Numbers from Column A are repeated in multiple rows (due to the fact that some companies have more than one Phone Number in Column C )... So, I'm looking to consolidate the Address Book Numbers that are the same (to one row) and have each phone number pertaining to the same address number in additional columns (within that row).
A列中的 通讯簿编号在多行中重复(由于某些公司C列中有多个电话号码 )...因此,我希望合并相同的通讯簿编号 (以一行),并在其他列(在该行内)中将每个电话号码都属于同一地址。
Current Excel Table: 当前的Excel表:
AddressBookNumber PhoneType PhoneNumber
1234 CELL (444)444-4444
1235 FAX (777)777-7777
1234 OFFICE (000)000-0000
1236 FAX (222)222-2222
1234 HOME (555)555-5555
1236 OFFICE (111)111-1111
Would like my Excel Table to look like: 希望我的Excel表如下所示:
|AddressBookNumber | PhoneType1 | PhoneNumber1 | Phone Type2 | PhoneNumber2 | PhoneType3 | PhoneNumber3 |
|1234 |CELL | (444)444-4444 | OFFICE | (000)000-0000 | HOME | (555)555-5555 |
|1235 |FAX | (777)777-7777 | | | |
|1236 |FAX | (222)222-2222 | OFFICE | (111)111-1111 | |
Essentially, I need to have the phone numbers pertaining to one company all in one row.. would appreciate any assistance on the formula I should use. 从本质上讲,我需要将一间公司的电话号码全部放在一行中。 Thanks!
谢谢!
To get the unique list use this array formula put this in F2: 要获得唯一列表,请使用以下数组公式将其放在F2中:
=IFERROR(INDEX($A$2:$A$7,MATCH(0,COUNTIF($F$1:F1,$A$2:$A$7),0)),"")
Hit Ctrl-Shift-Enter on exit of edit mode instead of Enter. 在退出编辑模式时按Ctrl-Shift-Enter而不是Enter。 Then copy/drag down till you get blanks.
然后复制/向下拖动直到出现空白。
And to get the numbers put this in G2: 并将数字放入G2:
=IFERROR(INDEX($B$2:$C$7,MATCH(1,(COUNTIFS($E$2:E2,$B$2:$B$7,$F$2:F2,$C$2:$C$7)=0)*($A$2:$A$7=$F2),0),MOD(COLUMN(A:A)-1,2)+1),"")
Hit Ctrl-Shift-Enter on exit of edit mode instead of Enter. 在退出编辑模式时按Ctrl-Shift-Enter而不是Enter。 Then copy/drag down and over till you get blanks.
然后向下复制/拖动,直到获得空白。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.