I cell conains then return 3 cells backwards exclude Duplicates formula needed

menor59

Well-known Member
Joined
Oct 3, 2008
Messages
574
Office Version
  1. 2021
Platform
  1. Windows
Hello all i hope your sunday is well

I have a table that in column E i have 3300, 2220, 1300, and 2000

what i need to get is...

iF E contains 3300 then REturn Range B once

ie.

B C D E
[TABLE="width: 646"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD]BANGA[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]3300[/TD]
[/TR]
[TR]
[TD]BANGA[/TD]
[TD]0[/TD]
[TD]2[/TD]
[TD]3300[/TD]
[/TR]
[TR]
[TD]BANGA[/TD]
[TD]0[/TD]
[TD]3[/TD]
[TD]3300[/TD]
[/TR]
[TR]
[TD]BARCEL[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]3300[/TD]
[/TR]
[TR]
[TD]BARCEL[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]3300[/TD]
[/TR]
[TR]
[TD]BARCEL[/TD]
[TD]0[/TD]
[TD]2[/TD]
[TD]3300
[/TD]
[/TR]
</tbody>[/TABLE]

So the Formula will return
[TABLE="width: 646"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD]BANGA
BARCEL[/TD]
[/TR]
</tbody>[/TABLE]


Thoughts or comments?
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Hi,

Try using the Array formula (Ctrl+Shift+Enter) and drag it down:
=IFERROR(INDEX($B$1:$B$6,MATCH(0,COUNTIF($F$1:F1,IF($E$1:$E$6=3300,$B$1:$B$6,"")),0)),"")

Your formula needs to be pasted into cell F2 (2nd row) due to $F$1:F1 count. The whole structure is nicely explained in the following post:
https://exceljet.net/formula/extract-unique-items-from-a-list

Hope it helps!
 
Last edited by a moderator:
Upvote 0

Forum statistics

Threads
1,223,891
Messages
6,175,229
Members
452,621
Latest member
Laura_PinksBTHFT

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