Unique values from multiple columns

ravi2628

Board Regular
Joined
Dec 20, 2017
Messages
221
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Dear Friends,

Good Morning, Afternoon, Night.

I was looking for a formula to extract the unique values from different columns in a excel.

input:
Book1
ABCDEFGH
1ConsiderInvoice NumberDivisionBill DateMonthHQPurchase OrderMaterial Description
2x912967556Cytotoxic14-04-2023AprilPuneEMAIL:-KETSIA 50MG/ML 10ML VIAL
3x912967556Cytotoxic14-04-2023AprilPuneEMAIL:-KETSIA 50MG/ML 10ML VIAL
4x912967557Cytotoxic14-04-2023AprilNashikEMAIL:-KETSIA 50MG/ML 10ML VIAL
5x912967558Cytotoxic20-04-2023AprilKurnoolEMAIL:-VIBRO 4 MG
6x912967558Cytotoxic20-04-2023AprilKurnoolEMAIL:-VIBRO 4 MG
7x912967559Cytotoxic22-04-2023AprilHyderabadEMAIL:-HYPROVAN MELT 100 MG
8x912967559Cytotoxic22-04-2023AprilHyderabadEMAIL:-HYPROVAN MELT 100 MG
9x912967559Cytotoxic22-04-2023AprilHyderabadEMAIL:-HYPROVAN MELT 100 MG
10x912967561MABS24-04-2023AprilHyderabadEMAIL:-LABIL 20MG (AMPOULE)
11x912967561MABS24-04-2023AprilHyderabadEMAIL:-LABIL 20MG (AMPOULE)
12x912967562MABS20-04-2023AprilDelhiorderCELOCORT 100 MG (25’S)
13x912967563MABS28-04-2023AprilVijayawadaEMAIL:-MIBEN 1MG/ML 10ML
14x912967564MABS28-04-2023AprilVijayawadaEMAIL:-KETSIA 50MG/ML 10ML VIAL
15x912967565MABS28-04-2023AprilHyderabadEMAIL:-HYPROVAN 100 MG
16x912967565MABS28-04-2023AprilHyderabadEMAIL:-HYPROVAN 100 MG
17x912967566Cytotoxic28-04-2023AprilJalgaonEMAIL:-KETSIA 50MG/ML 10ML VIAL
18912967567MABS21-04-2023AprilGunturEMAIL:-ENCOXEL 40 MG (2’S)
19x912967568Cytotoxic24-04-2023AprilHyderabadEMAIL:-HYPROVAN 200 MG
20x912967568Cytotoxic24-04-2023AprilHyderabadEMAIL:-HYPROVAN 200 MG
21x912967568Cytotoxic24-04-2023AprilHyderabadEMAIL:-HYPROVAN 200 MG
22x912967568Cytotoxic24-04-2023AprilHyderabadEMAIL:-LABIL 20MG (AMPOULE)
23x912967568Cytotoxic24-04-2023AprilHyderabadEMAIL:-ENCOXEL 20 MG (2’S)
24x912967569Cytotoxic26-04-2023AprilTrivandrumEMAIL:-TACHYDON 150 MG INJ
25912967571MABS28-04-2023AprilVijayawadaEMAIL:-CELODATE 20 MG
26912967571MABS28-04-2023AprilVijayawadaEMAIL:-CELODATE 20 MG
27912967571MABS28-04-2023AprilVijayawadaEMAIL:-CELODATE 20 MG
28912967571MABS28-04-2023AprilVijayawadaEMAIL:-CELODATE 20 MG
29912967571MABS28-04-2023AprilVijayawadaEMAIL:-CELODATE 20 MG
30x912967572Cytotoxic29-04-2023AprilHyderabadEMAIL:-VASCEL 20MG
31x912967572Cytotoxic29-04-2023AprilHyderabadEMAIL:-VASCEL 20MG
32x912967573MABS29-04-2023AprilKarimnagarEMAIL:-TRAMCEL 50
33x912967574MABS29-04-2023AprilSrinagarEMAIL:-SEDETO 100 MCG (1 X 5’S)
34x912967574MABS29-04-2023AprilSrinagarEMAIL:-SEDETO 100 MCG (1 X 5’S)
35x912967575Cytotoxic24-04-2023AprilNelloreEMAIL:-CELOPRED 40MG
36x912967575Cytotoxic24-04-2023AprilNelloreEMAIL:-CELOPRED 40MG
37x912967575Cytotoxic24-04-2023AprilNelloreEMAIL:-CELOPRED 40MG
38x912967575Cytotoxic26-04-2023AprilNelloreEMAIL:-CELOPRED 40MG
39x912967575Cytotoxic28-04-2023AprilNelloreEMAIL:-CELOPRED 40MG
Sheet1



Output:
Book1
ABC
1Filter Condition on Column A:X
2
3
4DivisionHQMaterial Description
5CytotoxicPuneKETSIA 50MG/ML 10ML VIAL
6CytotoxicNashikKETSIA 50MG/ML 10ML VIAL
7CytotoxicKurnoolVIBRO 4 MG
8CytotoxicHyderabadHYPROVAN MELT 100 MG
9MABSHyderabadLABIL 20MG (AMPOULE)
10MABSDelhiCELOCORT 100 MG (25’S)
11MABSVijayawadaMIBEN 1MG/ML 10ML
12MABSVijayawadaKETSIA 50MG/ML 10ML VIAL
13MABSHyderabadHYPROVAN 100 MG
14CytotoxicJalgaonKETSIA 50MG/ML 10ML VIAL
15CytotoxicHyderabadHYPROVAN 200 MG
16CytotoxicHyderabadLABIL 20MG (AMPOULE)
17CytotoxicHyderabadENCOXEL 20 MG (2’S)
18CytotoxicTrivandrumTACHYDON 150 MG INJ
19CytotoxicHyderabadVASCEL 20MG
20MABSKarimnagarTRAMCEL 50
21MABSSrinagarSEDETO 100 MCG (1 X 5’S)
22CytotoxicNelloreCELOPRED 40MG
Sheet2


Filter on Column A.
Unique values from C,F,H

Please help me out with the logic.

Thanks in advance.

Regards,
Ravi
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Like this?

ravi2628.xlsm
ABCDEFGHIJKL
1ConsiderInvoice NumberDivisionBill DateMonthHQPurchase OrderMaterial DescriptionDivisionHQMaterial Description
2x912967556Cytotoxic45030AprilPuneEMAIL:-KETSIA 50MG/ML 10ML VIALCytotoxicPuneKETSIA 50MG/ML 10ML VIAL
3x912967556Cytotoxic45030AprilPuneEMAIL:-KETSIA 50MG/ML 10ML VIALCytotoxicNashikKETSIA 50MG/ML 10ML VIAL
4x912967557Cytotoxic45030AprilNashikEMAIL:-KETSIA 50MG/ML 10ML VIALCytotoxicKurnoolVIBRO 4 MG
5x912967558Cytotoxic45036AprilKurnoolEMAIL:-VIBRO 4 MGCytotoxicHyderabadHYPROVAN MELT 100 MG
6x912967558Cytotoxic45036AprilKurnoolEMAIL:-VIBRO 4 MGMABSHyderabadLABIL 20MG (AMPOULE)
7x912967559Cytotoxic45038AprilHyderabadEMAIL:-HYPROVAN MELT 100 MGMABSDelhiCELOCORT 100 MG (25’S)
8x912967559Cytotoxic45038AprilHyderabadEMAIL:-HYPROVAN MELT 100 MGMABSVijayawadaMIBEN 1MG/ML 10ML
9x912967559Cytotoxic45038AprilHyderabadEMAIL:-HYPROVAN MELT 100 MGMABSVijayawadaKETSIA 50MG/ML 10ML VIAL
10x912967561MABS45040AprilHyderabadEMAIL:-LABIL 20MG (AMPOULE)MABSHyderabadHYPROVAN 100 MG
11x912967561MABS45040AprilHyderabadEMAIL:-LABIL 20MG (AMPOULE)CytotoxicJalgaonKETSIA 50MG/ML 10ML VIAL
12x912967562MABS45036AprilDelhiorderCELOCORT 100 MG (25’S)CytotoxicHyderabadHYPROVAN 200 MG
13x912967563MABS45044AprilVijayawadaEMAIL:-MIBEN 1MG/ML 10MLCytotoxicHyderabadLABIL 20MG (AMPOULE)
14x912967564MABS45044AprilVijayawadaEMAIL:-KETSIA 50MG/ML 10ML VIALCytotoxicHyderabadENCOXEL 20 MG (2’S)
15x912967565MABS45044AprilHyderabadEMAIL:-HYPROVAN 100 MGCytotoxicTrivandrumTACHYDON 150 MG INJ
16x912967565MABS45044AprilHyderabadEMAIL:-HYPROVAN 100 MGCytotoxicHyderabadVASCEL 20MG
17x912967566Cytotoxic45044AprilJalgaonEMAIL:-KETSIA 50MG/ML 10ML VIALMABSKarimnagarTRAMCEL 50
18912967567MABS45037AprilGunturEMAIL:-ENCOXEL 40 MG (2’S)MABSSrinagarSEDETO 100 MCG (1 X 5’S)
19x912967568Cytotoxic45040AprilHyderabadEMAIL:-HYPROVAN 200 MGCytotoxicNelloreCELOPRED 40MG
20x912967568Cytotoxic45040AprilHyderabadEMAIL:-HYPROVAN 200 MG
21x912967568Cytotoxic45040AprilHyderabadEMAIL:-HYPROVAN 200 MG
22x912967568Cytotoxic45040AprilHyderabadEMAIL:-LABIL 20MG (AMPOULE)
23x912967568Cytotoxic45040AprilHyderabadEMAIL:-ENCOXEL 20 MG (2’S)
24x912967569Cytotoxic45042AprilTrivandrumEMAIL:-TACHYDON 150 MG INJ
25912967571MABS45044AprilVijayawadaEMAIL:-CELODATE 20 MG
26912967571MABS45044AprilVijayawadaEMAIL:-CELODATE 20 MG
27912967571MABS45044AprilVijayawadaEMAIL:-CELODATE 20 MG
28912967571MABS45044AprilVijayawadaEMAIL:-CELODATE 20 MG
29912967571MABS45044AprilVijayawadaEMAIL:-CELODATE 20 MG
30x912967572Cytotoxic45045AprilHyderabadEMAIL:-VASCEL 20MG
31x912967572Cytotoxic45045AprilHyderabadEMAIL:-VASCEL 20MG
32x912967573MABS45045AprilKarimnagarEMAIL:-TRAMCEL 50
33x912967574MABS45045AprilSrinagarEMAIL:-SEDETO 100 MCG (1 X 5’S)
34x912967574MABS45045AprilSrinagarEMAIL:-SEDETO 100 MCG (1 X 5’S)
35x912967575Cytotoxic45040AprilNelloreEMAIL:-CELOPRED 40MG
36x912967575Cytotoxic45040AprilNelloreEMAIL:-CELOPRED 40MG
37x912967575Cytotoxic45040AprilNelloreEMAIL:-CELOPRED 40MG
38x912967575Cytotoxic45042AprilNelloreEMAIL:-CELOPRED 40MG
39x912967575Cytotoxic45044AprilNelloreEMAIL:-CELOPRED 40MG
Sheet1
Cell Formulas
RangeFormula
J1:L19J1=UNIQUE(CHOOSECOLS(FILTER(A1:H39,A1:A39<>""),3,6,8))
Dynamic array formulas.
 
Upvote 0
Solution
Like this?

ravi2628.xlsm
ABCDEFGHIJKL
1ConsiderInvoice NumberDivisionBill DateMonthHQPurchase OrderMaterial DescriptionDivisionHQMaterial Description
2x912967556Cytotoxic45030AprilPuneEMAIL:-KETSIA 50MG/ML 10ML VIALCytotoxicPuneKETSIA 50MG/ML 10ML VIAL
3x912967556Cytotoxic45030AprilPuneEMAIL:-KETSIA 50MG/ML 10ML VIALCytotoxicNashikKETSIA 50MG/ML 10ML VIAL
4x912967557Cytotoxic45030AprilNashikEMAIL:-KETSIA 50MG/ML 10ML VIALCytotoxicKurnoolVIBRO 4 MG
5x912967558Cytotoxic45036AprilKurnoolEMAIL:-VIBRO 4 MGCytotoxicHyderabadHYPROVAN MELT 100 MG
6x912967558Cytotoxic45036AprilKurnoolEMAIL:-VIBRO 4 MGMABSHyderabadLABIL 20MG (AMPOULE)
7x912967559Cytotoxic45038AprilHyderabadEMAIL:-HYPROVAN MELT 100 MGMABSDelhiCELOCORT 100 MG (25’S)
8x912967559Cytotoxic45038AprilHyderabadEMAIL:-HYPROVAN MELT 100 MGMABSVijayawadaMIBEN 1MG/ML 10ML
9x912967559Cytotoxic45038AprilHyderabadEMAIL:-HYPROVAN MELT 100 MGMABSVijayawadaKETSIA 50MG/ML 10ML VIAL
10x912967561MABS45040AprilHyderabadEMAIL:-LABIL 20MG (AMPOULE)MABSHyderabadHYPROVAN 100 MG
11x912967561MABS45040AprilHyderabadEMAIL:-LABIL 20MG (AMPOULE)CytotoxicJalgaonKETSIA 50MG/ML 10ML VIAL
12x912967562MABS45036AprilDelhiorderCELOCORT 100 MG (25’S)CytotoxicHyderabadHYPROVAN 200 MG
13x912967563MABS45044AprilVijayawadaEMAIL:-MIBEN 1MG/ML 10MLCytotoxicHyderabadLABIL 20MG (AMPOULE)
14x912967564MABS45044AprilVijayawadaEMAIL:-KETSIA 50MG/ML 10ML VIALCytotoxicHyderabadENCOXEL 20 MG (2’S)
15x912967565MABS45044AprilHyderabadEMAIL:-HYPROVAN 100 MGCytotoxicTrivandrumTACHYDON 150 MG INJ
16x912967565MABS45044AprilHyderabadEMAIL:-HYPROVAN 100 MGCytotoxicHyderabadVASCEL 20MG
17x912967566Cytotoxic45044AprilJalgaonEMAIL:-KETSIA 50MG/ML 10ML VIALMABSKarimnagarTRAMCEL 50
18912967567MABS45037AprilGunturEMAIL:-ENCOXEL 40 MG (2’S)MABSSrinagarSEDETO 100 MCG (1 X 5’S)
19x912967568Cytotoxic45040AprilHyderabadEMAIL:-HYPROVAN 200 MGCytotoxicNelloreCELOPRED 40MG
20x912967568Cytotoxic45040AprilHyderabadEMAIL:-HYPROVAN 200 MG
21x912967568Cytotoxic45040AprilHyderabadEMAIL:-HYPROVAN 200 MG
22x912967568Cytotoxic45040AprilHyderabadEMAIL:-LABIL 20MG (AMPOULE)
23x912967568Cytotoxic45040AprilHyderabadEMAIL:-ENCOXEL 20 MG (2’S)
24x912967569Cytotoxic45042AprilTrivandrumEMAIL:-TACHYDON 150 MG INJ
25912967571MABS45044AprilVijayawadaEMAIL:-CELODATE 20 MG
26912967571MABS45044AprilVijayawadaEMAIL:-CELODATE 20 MG
27912967571MABS45044AprilVijayawadaEMAIL:-CELODATE 20 MG
28912967571MABS45044AprilVijayawadaEMAIL:-CELODATE 20 MG
29912967571MABS45044AprilVijayawadaEMAIL:-CELODATE 20 MG
30x912967572Cytotoxic45045AprilHyderabadEMAIL:-VASCEL 20MG
31x912967572Cytotoxic45045AprilHyderabadEMAIL:-VASCEL 20MG
32x912967573MABS45045AprilKarimnagarEMAIL:-TRAMCEL 50
33x912967574MABS45045AprilSrinagarEMAIL:-SEDETO 100 MCG (1 X 5’S)
34x912967574MABS45045AprilSrinagarEMAIL:-SEDETO 100 MCG (1 X 5’S)
35x912967575Cytotoxic45040AprilNelloreEMAIL:-CELOPRED 40MG
36x912967575Cytotoxic45040AprilNelloreEMAIL:-CELOPRED 40MG
37x912967575Cytotoxic45040AprilNelloreEMAIL:-CELOPRED 40MG
38x912967575Cytotoxic45042AprilNelloreEMAIL:-CELOPRED 40MG
39x912967575Cytotoxic45044AprilNelloreEMAIL:-CELOPRED 40MG
Sheet1
Cell Formulas
RangeFormula
J1:L19J1=UNIQUE(CHOOSECOLS(FILTER(A1:H39,A1:A39<>""),3,6,8))
Dynamic array formulas.
Thanks Peter it was working perfectly for 365 but how to use in 2016 or 2019 because some of our device still have older versions
 
Upvote 0
.. how to use in 2016 or 2019 because some of our device still have older versions
If version is important, please specify that in your opening post so helpers don't waste their time developing a suggestion that will not be accepted.

I would use helper columns. I have used N:O and these could later be hidden.

ravi2628.xlsm
ABCDEFGHIJKLMNO
1ConsiderInvoice NumberDivisionBill DateMonthHQPurchase OrderMaterial Description
2x912967556Cytotoxic45030AprilPuneEMAIL:-KETSIA 50MG/ML 10ML VIALCytotoxicPuneKETSIA 50MG/ML 10ML VIAL1|Cytotoxic|Pune|KETSIA 50MG/ML 10ML VIAL|
3x912967556Cytotoxic45030AprilPuneEMAIL:-KETSIA 50MG/ML 10ML VIALCytotoxicNashikKETSIA 50MG/ML 10ML VIAL2|Cytotoxic|Pune|KETSIA 50MG/ML 10ML VIAL|
4x912967557Cytotoxic45030AprilNashikEMAIL:-KETSIA 50MG/ML 10ML VIALCytotoxicKurnoolVIBRO 4 MG1|Cytotoxic|Nashik|KETSIA 50MG/ML 10ML VIAL|
5x912967558Cytotoxic45036AprilKurnoolEMAIL:-VIBRO 4 MGCytotoxicHyderabadHYPROVAN MELT 100 MG1|Cytotoxic|Kurnool|VIBRO 4 MG|
6x912967558Cytotoxic45036AprilKurnoolEMAIL:-VIBRO 4 MGMABSHyderabadLABIL 20MG (AMPOULE)2|Cytotoxic|Kurnool|VIBRO 4 MG|
7x912967559Cytotoxic45038AprilHyderabadEMAIL:-HYPROVAN MELT 100 MGMABSDelhiCELOCORT 100 MG (25’S)1|Cytotoxic|Hyderabad|HYPROVAN MELT 100 MG|
8x912967559Cytotoxic45038AprilHyderabadEMAIL:-HYPROVAN MELT 100 MGMABSVijayawadaMIBEN 1MG/ML 10ML2|Cytotoxic|Hyderabad|HYPROVAN MELT 100 MG|
9x912967559Cytotoxic45038AprilHyderabadEMAIL:-HYPROVAN MELT 100 MGMABSVijayawadaKETSIA 50MG/ML 10ML VIAL3|Cytotoxic|Hyderabad|HYPROVAN MELT 100 MG|
10x912967561MABS45040AprilHyderabadEMAIL:-LABIL 20MG (AMPOULE)MABSHyderabadHYPROVAN 100 MG1|MABS|Hyderabad|LABIL 20MG (AMPOULE)|
11x912967561MABS45040AprilHyderabadEMAIL:-LABIL 20MG (AMPOULE)CytotoxicJalgaonKETSIA 50MG/ML 10ML VIAL2|MABS|Hyderabad|LABIL 20MG (AMPOULE)|
12x912967562MABS45036AprilDelhiorderCELOCORT 100 MG (25’S)CytotoxicHyderabadHYPROVAN 200 MG1|MABS|Delhi|CELOCORT 100 MG (25’S)|
13x912967563MABS45044AprilVijayawadaEMAIL:-MIBEN 1MG/ML 10MLCytotoxicHyderabadLABIL 20MG (AMPOULE)1|MABS|Vijayawada|MIBEN 1MG/ML 10ML|
14x912967564MABS45044AprilVijayawadaEMAIL:-KETSIA 50MG/ML 10ML VIALCytotoxicHyderabadENCOXEL 20 MG (2’S)1|MABS|Vijayawada|KETSIA 50MG/ML 10ML VIAL|
15x912967565MABS45044AprilHyderabadEMAIL:-HYPROVAN 100 MGCytotoxicTrivandrumTACHYDON 150 MG INJ1|MABS|Hyderabad|HYPROVAN 100 MG|
16x912967565MABS45044AprilHyderabadEMAIL:-HYPROVAN 100 MGCytotoxicHyderabadVASCEL 20MG2|MABS|Hyderabad|HYPROVAN 100 MG|
17x912967566Cytotoxic45044AprilJalgaonEMAIL:-KETSIA 50MG/ML 10ML VIALMABSKarimnagarTRAMCEL 501|Cytotoxic|Jalgaon|KETSIA 50MG/ML 10ML VIAL|
18912967567MABS45037AprilGunturEMAIL:-ENCOXEL 40 MG (2’S)MABSSrinagarSEDETO 100 MCG (1 X 5’S)  
19x912967568Cytotoxic45040AprilHyderabadEMAIL:-HYPROVAN 200 MGCytotoxicNelloreCELOPRED 40MG1|Cytotoxic|Hyderabad|HYPROVAN 200 MG|
20x912967568Cytotoxic45040AprilHyderabadEMAIL:-HYPROVAN 200 MG   2|Cytotoxic|Hyderabad|HYPROVAN 200 MG|
21x912967568Cytotoxic45040AprilHyderabadEMAIL:-HYPROVAN 200 MG   3|Cytotoxic|Hyderabad|HYPROVAN 200 MG|
22x912967568Cytotoxic45040AprilHyderabadEMAIL:-LABIL 20MG (AMPOULE)   1|Cytotoxic|Hyderabad|LABIL 20MG (AMPOULE)|
23x912967568Cytotoxic45040AprilHyderabadEMAIL:-ENCOXEL 20 MG (2’S)   1|Cytotoxic|Hyderabad|ENCOXEL 20 MG (2’S)|
24x912967569Cytotoxic45042AprilTrivandrumEMAIL:-TACHYDON 150 MG INJ1|Cytotoxic|Trivandrum|TACHYDON 150 MG INJ|
25912967571MABS45044AprilVijayawadaEMAIL:-CELODATE 20 MG  
26912967571MABS45044AprilVijayawadaEMAIL:-CELODATE 20 MG  
27912967571MABS45044AprilVijayawadaEMAIL:-CELODATE 20 MG  
28912967571MABS45044AprilVijayawadaEMAIL:-CELODATE 20 MG  
29912967571MABS45044AprilVijayawadaEMAIL:-CELODATE 20 MG  
30x912967572Cytotoxic45045AprilHyderabadEMAIL:-VASCEL 20MG1|Cytotoxic|Hyderabad|VASCEL 20MG|
31x912967572Cytotoxic45045AprilHyderabadEMAIL:-VASCEL 20MG2|Cytotoxic|Hyderabad|VASCEL 20MG|
32x912967573MABS45045AprilKarimnagarEMAIL:-TRAMCEL 501|MABS|Karimnagar|TRAMCEL 50|
33x912967574MABS45045AprilSrinagarEMAIL:-SEDETO 100 MCG (1 X 5’S)1|MABS|Srinagar|SEDETO 100 MCG (1 X 5’S)|
34x912967574MABS45045AprilSrinagarEMAIL:-SEDETO 100 MCG (1 X 5’S)2|MABS|Srinagar|SEDETO 100 MCG (1 X 5’S)|
35x912967575Cytotoxic45040AprilNelloreEMAIL:-CELOPRED 40MG1|Cytotoxic|Nellore|CELOPRED 40MG|
36x912967575Cytotoxic45040AprilNelloreEMAIL:-CELOPRED 40MG2|Cytotoxic|Nellore|CELOPRED 40MG|
37x912967575Cytotoxic45040AprilNelloreEMAIL:-CELOPRED 40MG3|Cytotoxic|Nellore|CELOPRED 40MG|
38x912967575Cytotoxic45042AprilNelloreEMAIL:-CELOPRED 40MG4|Cytotoxic|Nellore|CELOPRED 40MG|
39x912967575Cytotoxic45044AprilNelloreEMAIL:-CELOPRED 40MG5|Cytotoxic|Nellore|CELOPRED 40MG|
Sheet3
Cell Formulas
RangeFormula
J2:J23J2=IFERROR(INDEX(C:C,AGGREGATE(15,6,ROW(C$2:C$39)/($N$2:$N$39=1),ROWS(J$2:J2))),"")
K2:K23K2=IFERROR(INDEX(F:F,AGGREGATE(15,6,ROW(F$2:F$39)/($N$2:$N$39=1),ROWS(K$2:K2))),"")
L2:L23L2=IFERROR(INDEX(H:H,AGGREGATE(15,6,ROW(H$2:H$39)/($N$2:$N$39=1),ROWS(L$2:L2))),"")
N2:N39N2=IF(O2="","",COUNTIF(O$2:O2,O2))
O2:O39O2=IF(A2="","","|"&C2&"|"&F2&"|"&H2&"|")
 
Upvote 0
If version is important, please specify that in your opening post so helpers don't waste their time developing a suggestion that will not be accepted.

I would use helper columns. I have used N:O and these could later be hidden.

ravi2628.xlsm
ABCDEFGHIJKLMNO
1ConsiderInvoice NumberDivisionBill DateMonthHQPurchase OrderMaterial Description
2x912967556Cytotoxic45030AprilPuneEMAIL:-KETSIA 50MG/ML 10ML VIALCytotoxicPuneKETSIA 50MG/ML 10ML VIAL1|Cytotoxic|Pune|KETSIA 50MG/ML 10ML VIAL|
3x912967556Cytotoxic45030AprilPuneEMAIL:-KETSIA 50MG/ML 10ML VIALCytotoxicNashikKETSIA 50MG/ML 10ML VIAL2|Cytotoxic|Pune|KETSIA 50MG/ML 10ML VIAL|
4x912967557Cytotoxic45030AprilNashikEMAIL:-KETSIA 50MG/ML 10ML VIALCytotoxicKurnoolVIBRO 4 MG1|Cytotoxic|Nashik|KETSIA 50MG/ML 10ML VIAL|
5x912967558Cytotoxic45036AprilKurnoolEMAIL:-VIBRO 4 MGCytotoxicHyderabadHYPROVAN MELT 100 MG1|Cytotoxic|Kurnool|VIBRO 4 MG|
6x912967558Cytotoxic45036AprilKurnoolEMAIL:-VIBRO 4 MGMABSHyderabadLABIL 20MG (AMPOULE)2|Cytotoxic|Kurnool|VIBRO 4 MG|
7x912967559Cytotoxic45038AprilHyderabadEMAIL:-HYPROVAN MELT 100 MGMABSDelhiCELOCORT 100 MG (25’S)1|Cytotoxic|Hyderabad|HYPROVAN MELT 100 MG|
8x912967559Cytotoxic45038AprilHyderabadEMAIL:-HYPROVAN MELT 100 MGMABSVijayawadaMIBEN 1MG/ML 10ML2|Cytotoxic|Hyderabad|HYPROVAN MELT 100 MG|
9x912967559Cytotoxic45038AprilHyderabadEMAIL:-HYPROVAN MELT 100 MGMABSVijayawadaKETSIA 50MG/ML 10ML VIAL3|Cytotoxic|Hyderabad|HYPROVAN MELT 100 MG|
10x912967561MABS45040AprilHyderabadEMAIL:-LABIL 20MG (AMPOULE)MABSHyderabadHYPROVAN 100 MG1|MABS|Hyderabad|LABIL 20MG (AMPOULE)|
11x912967561MABS45040AprilHyderabadEMAIL:-LABIL 20MG (AMPOULE)CytotoxicJalgaonKETSIA 50MG/ML 10ML VIAL2|MABS|Hyderabad|LABIL 20MG (AMPOULE)|
12x912967562MABS45036AprilDelhiorderCELOCORT 100 MG (25’S)CytotoxicHyderabadHYPROVAN 200 MG1|MABS|Delhi|CELOCORT 100 MG (25’S)|
13x912967563MABS45044AprilVijayawadaEMAIL:-MIBEN 1MG/ML 10MLCytotoxicHyderabadLABIL 20MG (AMPOULE)1|MABS|Vijayawada|MIBEN 1MG/ML 10ML|
14x912967564MABS45044AprilVijayawadaEMAIL:-KETSIA 50MG/ML 10ML VIALCytotoxicHyderabadENCOXEL 20 MG (2’S)1|MABS|Vijayawada|KETSIA 50MG/ML 10ML VIAL|
15x912967565MABS45044AprilHyderabadEMAIL:-HYPROVAN 100 MGCytotoxicTrivandrumTACHYDON 150 MG INJ1|MABS|Hyderabad|HYPROVAN 100 MG|
16x912967565MABS45044AprilHyderabadEMAIL:-HYPROVAN 100 MGCytotoxicHyderabadVASCEL 20MG2|MABS|Hyderabad|HYPROVAN 100 MG|
17x912967566Cytotoxic45044AprilJalgaonEMAIL:-KETSIA 50MG/ML 10ML VIALMABSKarimnagarTRAMCEL 501|Cytotoxic|Jalgaon|KETSIA 50MG/ML 10ML VIAL|
18912967567MABS45037AprilGunturEMAIL:-ENCOXEL 40 MG (2’S)MABSSrinagarSEDETO 100 MCG (1 X 5’S)  
19x912967568Cytotoxic45040AprilHyderabadEMAIL:-HYPROVAN 200 MGCytotoxicNelloreCELOPRED 40MG1|Cytotoxic|Hyderabad|HYPROVAN 200 MG|
20x912967568Cytotoxic45040AprilHyderabadEMAIL:-HYPROVAN 200 MG   2|Cytotoxic|Hyderabad|HYPROVAN 200 MG|
21x912967568Cytotoxic45040AprilHyderabadEMAIL:-HYPROVAN 200 MG   3|Cytotoxic|Hyderabad|HYPROVAN 200 MG|
22x912967568Cytotoxic45040AprilHyderabadEMAIL:-LABIL 20MG (AMPOULE)   1|Cytotoxic|Hyderabad|LABIL 20MG (AMPOULE)|
23x912967568Cytotoxic45040AprilHyderabadEMAIL:-ENCOXEL 20 MG (2’S)   1|Cytotoxic|Hyderabad|ENCOXEL 20 MG (2’S)|
24x912967569Cytotoxic45042AprilTrivandrumEMAIL:-TACHYDON 150 MG INJ1|Cytotoxic|Trivandrum|TACHYDON 150 MG INJ|
25912967571MABS45044AprilVijayawadaEMAIL:-CELODATE 20 MG  
26912967571MABS45044AprilVijayawadaEMAIL:-CELODATE 20 MG  
27912967571MABS45044AprilVijayawadaEMAIL:-CELODATE 20 MG  
28912967571MABS45044AprilVijayawadaEMAIL:-CELODATE 20 MG  
29912967571MABS45044AprilVijayawadaEMAIL:-CELODATE 20 MG  
30x912967572Cytotoxic45045AprilHyderabadEMAIL:-VASCEL 20MG1|Cytotoxic|Hyderabad|VASCEL 20MG|
31x912967572Cytotoxic45045AprilHyderabadEMAIL:-VASCEL 20MG2|Cytotoxic|Hyderabad|VASCEL 20MG|
32x912967573MABS45045AprilKarimnagarEMAIL:-TRAMCEL 501|MABS|Karimnagar|TRAMCEL 50|
33x912967574MABS45045AprilSrinagarEMAIL:-SEDETO 100 MCG (1 X 5’S)1|MABS|Srinagar|SEDETO 100 MCG (1 X 5’S)|
34x912967574MABS45045AprilSrinagarEMAIL:-SEDETO 100 MCG (1 X 5’S)2|MABS|Srinagar|SEDETO 100 MCG (1 X 5’S)|
35x912967575Cytotoxic45040AprilNelloreEMAIL:-CELOPRED 40MG1|Cytotoxic|Nellore|CELOPRED 40MG|
36x912967575Cytotoxic45040AprilNelloreEMAIL:-CELOPRED 40MG2|Cytotoxic|Nellore|CELOPRED 40MG|
37x912967575Cytotoxic45040AprilNelloreEMAIL:-CELOPRED 40MG3|Cytotoxic|Nellore|CELOPRED 40MG|
38x912967575Cytotoxic45042AprilNelloreEMAIL:-CELOPRED 40MG4|Cytotoxic|Nellore|CELOPRED 40MG|
39x912967575Cytotoxic45044AprilNelloreEMAIL:-CELOPRED 40MG5|Cytotoxic|Nellore|CELOPRED 40MG|
Sheet3
Cell Formulas
RangeFormula
J2:J23J2=IFERROR(INDEX(C:C,AGGREGATE(15,6,ROW(C$2:C$39)/($N$2:$N$39=1),ROWS(J$2:J2))),"")
K2:K23K2=IFERROR(INDEX(F:F,AGGREGATE(15,6,ROW(F$2:F$39)/($N$2:$N$39=1),ROWS(K$2:K2))),"")
L2:L23L2=IFERROR(INDEX(H:H,AGGREGATE(15,6,ROW(H$2:H$39)/($N$2:$N$39=1),ROWS(L$2:L2))),"")
N2:N39N2=IF(O2="","",COUNTIF(O$2:O2,O2))
O2:O39O2=IF(A2="","","|"&C2&"|"&F2&"|"&H2&"|")
Thank you peter & also sorry for not mentioning the version earlier
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top