Excel -- 第一行中的单元格值匹配,Return 行中的值与多列匹配
Excel -- Cell Values Match in First Row, Return Values on One Row with Multiple Columns
以下是我遇到困难的解释:
A 列:列出不同公司的地址簿号码(1234、1235、1236 等)
B 列:列出 Phone 类型(手机、传真、家庭)
C 列:列出公司 Phone 编号
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).
当前 Excel Table:
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
希望我的 Excel Table 看起来像:
|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 | |
本质上,我需要将与一家公司有关的 phone 数字全部排成一行。如果对我应该使用的公式有任何帮助,我将不胜感激。谢谢!
要获得唯一列表,请使用此数组公式将其放入 F2:
=IFERROR(INDEX($A:$A,MATCH(0,COUNTIF($F:F1,$A:$A),0)),"")
退出编辑模式时按 Ctrl-Shift-Enter 而不是 Enter。然后 copy/drag 向下,直到出现空白。
为了获得数字,请将其放入 G2:
=IFERROR(INDEX($B:$C,MATCH(1,(COUNTIFS($E:E2,$B:$B,$F:F2,$C:$C)=0)*($A:$A=$F2),0),MOD(COLUMN(A:A)-1,2)+1),"")
退出编辑模式时按 Ctrl-Shift-Enter 而不是 Enter。然后 copy/drag 一直往下直到你得到空白。
以下是我遇到困难的解释:
A 列:列出不同公司的地址簿号码(1234、1235、1236 等)
B 列:列出 Phone 类型(手机、传真、家庭)
C 列:列出公司 Phone 编号
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).
当前 Excel Table:
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
希望我的 Excel Table 看起来像:
|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 | |
本质上,我需要将与一家公司有关的 phone 数字全部排成一行。如果对我应该使用的公式有任何帮助,我将不胜感激。谢谢!
要获得唯一列表,请使用此数组公式将其放入 F2:
=IFERROR(INDEX($A:$A,MATCH(0,COUNTIF($F:F1,$A:$A),0)),"")
退出编辑模式时按 Ctrl-Shift-Enter 而不是 Enter。然后 copy/drag 向下,直到出现空白。
为了获得数字,请将其放入 G2:
=IFERROR(INDEX($B:$C,MATCH(1,(COUNTIFS($E:E2,$B:$B,$F:F2,$C:$C)=0)*($A:$A=$F2),0),MOD(COLUMN(A:A)-1,2)+1),"")
退出编辑模式时按 Ctrl-Shift-Enter 而不是 Enter。然后 copy/drag 一直往下直到你得到空白。