Formula returns blank due to duplicates

ozbeachbum

Board Regular
Joined
Jun 3, 2015
Messages
210
Office Version
  1. 2021
Platform
  1. Windows
I am using the following formula, however where ever there is duplicate text or a text string containing duplicate non alpha characters EG: [ ] the formula only returns a result for one and a blank for the other.

=IF(GD70:GD340="","",XLOOKUP(GD70:GD340,JN70:JN340,JP70:JP340,"",0)) [Column JP contains the targeted information]

I had a similar issue with another formula which Peter solved for me by using INDEX, I tried using it with this formula but not fully understanding the context I was not successful.
Any assistance greatly appreciated.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Could you possibly upload a sample of your data because from the description it seems that there is no match for the relevant data, therefore e.g. use of of wildcards is needed...
 
Upvote 0
Hi,
Thanks for the reply.
I have provided a copy of the section of the sheet with the problem, adulterated as there were too many cells for a mini sheet.
Thanks for you help.
240818 duplicates.xlsx
GDGEGFGGGHGIGJGKGL
70Bogangar Body Corp:00.00Bogangar Body Corp:DE
71
72NIB:00.00NIB:DE
73
74Woolworths:00.00Woolworths:DE
75
76Repay Monies Borrowed RES02 Geriatric Gypsies World Tour:00.00Repay Monies Borrowed RES02 Geriatric Gypsies World Tour:DE
77
78(Membership Fees) Lions:00.00(Membership Fees) Lions:DE
79
80(Dinners Etc) Lions:00.00(Dinners Etc) Lions:DE
81
82Grandkids 18th:00.00Grandkids 18th:DE
83
84Expenses Redraw Average:00.00Expenses Redraw Average:DE
85
86Mortgage Interest:00.00Mortgage Payment Fortnightly Minimum:
87
88RES02 Body Corporation:00.00Mortgage Payment Fortnightly Minimum:
89
90 RES02 Hollard Insurance:00.00Mortgage Payment Fortnightly Minimum:
91
92Gold Coast City Council [Rates Property]:00.00Mortgage Interest:DE
93
94Gold Coast City Council [Rates Water]:00.00RES02 Body Corporation:DE
95
96Tweed Shire Council [Rates Property]:00.00 RES02 Hollard Insurance:DE
97
98Tweed Shire Council [Rates Water]:00.00Gold Coast City Council [Rates Property]:DE
99
100Dodo Power & Gas:00.00Gold Coast City Council [Rates Water]:DE
101
102Optus Mobile:00.00Tweed Shire Council [Rates Property]:DE
103
104AAA Comet Gas:00.00Tweed Shire Council [Rates Water]:DE
105
106Cudgen Headland SLSC:00.00Dodo Power & Gas:DE
107
108Cabarita Beach Bowls & Sports Club:00.00Optus Mobile:DE
109
110Cabarita Beach Bogangar Residents Association:00.00AAA Comet Gas:DE
111
112Pottsville Beach Sports Club:00.00Cudgen Headland SLSC:DE
113
114Australian Atheists Society:00.00Cabarita Beach Bowls & Sports Club:DE
115
116(Safety Check) Mazda 2 Pink Slip:00.00Cabarita Beach Bogangar Residents Association:DE
117
118(Insurance Compulsory Third Party) Mazda 2 Green Slip:00.00Pottsville Beach Sports Club:DE
119
120(Insurance Third Party Property Damage) Mazda 2 NRMA:00.00Australian Atheists Society:DE
121
122Blank Bottom00.00(Safety Check) Mazda 2 Pink Slip:DE
123
124Blank Row00.00(Insurance Compulsory Third Party) Mazda 2 Green Slip:DE
125
126Debits Transferred from TR Mmm & Mmm00.00(Insurance Third Party Property Damage) Mazda 2 NRMA:DE
127
128Blank Row00.00Blank BottomDE
129Blank RowDE
130Blank Top00.00Debits Transferred from TR Mmm & MmmDE
131Blank RowDE
132Housekeeping:00.00Blank TopDE
133
134Medical & Medications:00.00Housekeeping:DE
135
136Household Items:00.00Medical & Medications:DE
137
138Personal:00.00Household Items:DE
139
140Entertainment:00.00Personal:DE
141
142Gifts & Raffles:00.00Entertainment:DE
143
144Vehicle:00.00Gifts & Raffles:DE
145
146Miscellaneous:00.00Vehicle:DE
147
148Holidays & Sydney Trip:00.00Miscellaneous:DE
149
150RES02 CA&W; R&M Payments by Us:00.00Investments:
151
152Transfers:00.00Holidays & Sydney Trip:DE
153
154Blank Bottom00.00RES02 CA&W; R&M Payments by Us:DE
155
156Blank Row00.00Transfers:DE
157Redraw Disinvestments:
158Southport00.00Blank BottomRedraw Disinvestments:DE
159Blank RowDE
160Blank Row00.00SouthportDE
161Blank RowRedraw Extras:DE
162Expenditure RES0200.00Expenditure RES02DE
163Blank RowRedraw Capital Allocations & Works; Maintenance & Repairs:DE
164Blank Row00.00Blank TopDE
165Rent Advanced Payments:
166Blank Top00.00Grand Totals:DE
167Rent Advanced Payments:
168Grand Totals:00.00Total Advertising:01DE
169
170Total Advertising:01.00RES02 Body Corporation:02DE
171
172RES02 Body Corporation:00.00Deductable Borrowing Expenses:03DE
173
174Deductable Borrowing Expenses:03.00Total Cleaning Charges:04DE
175
176Total Cleaning Charges:04.00Gold Coast City Council [Rates Property]:05DE
177
178Gold Coast City Council [Rates Property]:00.00Capital Allowances:06DE
179
180Capital Allowances:06.00Gardening:07DE
181
182Gardening:07.00 RES02 Hollard Insurance:08DE
183
184 RES02 Hollard Insurance:00.00Mortgage Interest:09DE
185
186Mortgage Interest:00.00Land Tax:10DE
187
188Land Tax:10.00Legal Fees:11DE
189
190Legal Fees:11.00Pest Control:12DE
191
192Pest Control:12.00(Administration Fee `+` Rent Commission `+` Letting Fee ) Agent's Fees:13DE
193
194(Administration Fee `+` Rent Commission `+` Letting Fee ) Agent's Fees:13.00Agent Administration Fee:13.01DE
195
196Agent Administration Fee:13.01Rent Commission $:13.02DE
197
198Rent Commission $:13.02(Lease inc GST) Agent Letting Fee:13.03DE
199
200(Lease inc GST) Agent Letting Fee:13.03Maintenance & Repairs:14DE
201
202Maintenance & Repairs:14.00Total Capital Works:15DE
203
204Total Capital Works:15.00Phone; Postage & Stationery:16DE
205
206Phone; Postage & Stationery:16.00Travel Expenses:17DE
207
208Travel Expenses:17.00Gold Coast City Council [Rates Water]:18DE
209
210Gold Coast City Council [Rates Water]:00.00Total Other Expenses:19DE
211
212Total Other Expenses:19.00Blank BottomDE
213Blank RowDE
214Blank Bottom0
215
216Blank Row0
217
Blank (2)
Cell Formulas
RangeFormula
GD70:GD217GD70=LET(f,FILTER(GH70:GH340,(GL70:GL340="DE")*(GH70:GH340<>"")),s,SEQUENCE(2*ROWS(f),,2),IF(ISEVEN(s),INDEX(f,s/2),""))
GF70:GF340GF70=IF(GD70:GD340="","",XLOOKUP(GD70:GD340,GH70:GH340,GJ70:GJ340,"",0))
Dynamic array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
GL70:GL213Cell Value=1textYES
GL70:GL213Cell Value="1M"textYES
GL70:GL213Cell Value=2textYES
GL70:GL213Cell Value="2M"textYES
GL70:GL213Cell Value=3textYES
GL70:GL213Cell Value="3M"textYES
GL70:GL213Cell Value=4textYES
GL70:GL213Cell Value=5textYES
GL70:GL213Cell Value="5M"textYES
GL70:GL213Cell Value=6textYES
GL70:GL213Cell Value=7textYES
GL70:GL213Cell Value="7M"textYES
GL70:GL213Cell Valuecontains "CE"textYES
GL70:GL213Expression=AND(GL70="DE",GL71="DE")textYES
GL70:GL213Cell Value="DE"textYES
 
Upvote 0
What is the formula supposed to be doing?

Currently it is looking for the first occurrence of the GD value in GH and returning the value from GJ. So for row 172 for example it is looking for "RES02 Body Corporation:" and finds it in GH94 so returns the value from GJ94 which is blank so returns it as 0.
 
Upvote 0
I am trying to have the formula return the number in GJ if GD & GH match

EG:
"Total Advertising:" GD170 = GH168 Should Return 01 from GJ168 (Current sheet shows 01)
"RES02 Body Corporation:" GD172 = GH170 Should Return 02 from GJ170 (Current sheet shows 00)
"Mortgage Interest" GD186 = GH184 Should Return 09 from GJ184 (Current sheet shows 00)

Trust this helps.
Thanks again for all your assistance.
 
Upvote 0
Does this do what you want then?
Excel Formula:
=IF(GD70:GD340="","",SUMIFS(GJ70:GJ340,GH70:GH340,GD70:GD340))
 
Upvote 0
Solution

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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