Formula needs to be corrected

RAJESH1960

Banned for repeated rules violations
Joined
Mar 26, 2020
Messages
2,313
Office Version
  1. 2019
Platform
  1. Windows
I have to delete the rows which have one Invoice number more than once marked in green. There are multiple Invoice numbers in column E which are common. With the help of a formula in column D, I want to display only the invoice number once and leave the rows blank where the invoice number is the same. The yellow marked cells in column D have still common numbers. I need help in editing the formula to get each invoice number only once in column D. Then I can sort the column D and delete the blank cells.

Book1.xlsx
DEFG
1Get 1 Invoice NumberInvoice numberInvoice DateInvoice Value (₹)
2 1006-06-202048486.00
3 1122-02-20217080.00
4676710-07-20203127.82
5 6710-07-20203127.82
6 11627-10-202024800.00
711511527-10-202024800.00
811511527-10-202024800.00
9 11527-10-202024800.00
1023923916-01-202114780.00
11 23916-01-202114780.00
1230930931-03-202121249.48
13 30931-03-202121249.48
1482982921-01-20211014.00
1582982921-01-20211014.00
16 82921-01-20211014.00
17 384603-12-202024135.00
183862386207-12-20207880.00
19 386207-12-20207880.00
203935393531-12-20201530.00
21 393531-12-20201530.00
220011/20-210011/20-2104-06-202014967.00
23 0011/20-2104-06-202014967.00
240116/20-210116/20-2121-05-202029280.00
250116/20-210116/20-2121-05-202029280.00
26 0116/20-2121-05-202029280.00
27 015/BR/2000070810-07-202012071.00
280411/20-210411/20-2109-09-202042579.00
29 0411/20-2109-09-202042579.00
300478/20-210478/20-2118-09-2020104953.00
310478/20-210478/20-2118-09-2020104953.00
32 0478/20-2118-09-2020104953.00
33 0479/20-2101-09-2021104953.00
340688/20-210688/20-2110-10-202093114.00
35 0688/20-2110-10-202093114.00
361494/20-211494/20-2127-01-2021257332.00
37 1494/20-2127-01-2021257332.00
381585/20-211585/20-2108-02-2021186029.00
39 1585/20-2108-02-2021186029.00
401632/20-211632/20-2115-02-2021176632.00
41 1632/20-2115-02-2021176632.00
42AIM-20-048AIM-20-04823-09-2020106305.16
43 AIM-20-04823-09-2020106305.16
44B/S/696/2021B/S/696/202131-08-2020158468.98
45 B/S/696/202131-08-2020158468.98
46BIS-BLR/2703BIS-BLR/270302-03-202120268.00
47BIS-BLR/2703BIS-BLR/270302-03-202120268.00
48 BIS-BLR/270302-03-202120268.00
49D200002D20000205-05-202014066.00
50 D20000205-05-202014066.00
51INC/2622INC/262215-01-20211416.00
52INC/2622INC/262215-01-20211416.00
53 INC/262215-01-20211416.00
54INC/2784INC/278410-03-202144241.00
55 INC/278410-03-202144241.00
56INC/2825INC/282523-03-202136519.00
57 INC/282523-03-202136519.00
58INC/2846INC/284631-03-202116468.00
59 INC/284631-03-202116468.00
60INMDTA2021/00360INMDTA2021/0036008-05-2020103456.00
61 INMDTA2021/0036008-05-2020103456.00
62INMDTA2021/00440INMDTA2021/0044015-05-2020618867.55
63 INMDTA2021/0044015-05-2020618867.55
64INMDTA2021/00751INMDTA2021/0075126-05-2020490541.60
65 INMDTA2021/0075126-05-2020490541.60
66INMDTA2021/04675INMDTA2021/0467510-10-2020450045.60
67 INMDTA2021/0467510-10-2020450045.60
68OIM-20-008OIM-20-00828-07-202056132.06
69 OIM-20-00828-07-202056132.06
70PH-1498PH-149820-01-202110780.00
71 PH-149820-01-202110780.00
72PIA2001782PIA200178230-07-2020134437.02
73PIA2001782PIA200178230-07-2020134437.02
74 PIA200178230-07-2020134437.02
75PIA2005028PIA200502808-12-202093949.00
76 PIA200502808-12-202093949.00
77SERVBAJV21000449SERVBAJV2100044924-06-202053692.00
78 SERVBAJV2100044924-06-202053692.00
79SERVBAJV21001330SERVBAJV2100133006-10-202017833.00
80 SERVBAJV2100133006-10-202017833.00
81SERVBAJV21002524SERVBAJV2100252420-01-202127951.00
82 SERVBAJV2100252420-01-202127951.00
83SERVBAJV21003276SERVBAJV2100327630-03-202159058.00
84SERVBAJV21003276SERVBAJV2100327630-03-202159058.00
85 SERVBAJV2100327630-03-202159058.00
86SIKRMGL4387SIKRMGL438701-01-202123800.00
87 SIKRMGL438701-01-202123800.00
Query.
Cell Formulas
RangeFormula
D2:D87D2=IF(E2=E3,E2,"")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E37:E49,E52:E87,E5:E26,E29:E34Expression=OR(AND(E5=E6,G5=G6),AND(E5=E4,G5=G4))textNO
E4,E36,E51,E28Expression=OR(AND(E4=E5,G4=G5),AND(E4=#REF!,G4=#REF!))textNO
E35,E50,E27Expression=OR(AND(E27=#REF!,G27=#REF!),AND(E27=E26,G27=G26))textNO
E2Expression=OR(AND(E2=#REF!,G2=#REF!),AND(E2=#REF!,G2=#REF!))textNO
E3Expression=OR(AND(E3=#REF!,G3=#REF!),AND(E3=#REF!,G3=#REF!))textNO
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Forum statistics

Threads
1,215,063
Messages
6,122,935
Members
449,094
Latest member
teemeren

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