Rewrite formula so 2nd, 3rd…occurrence of lookup value return blank cell

Sean15

Well-known Member
Joined
Jun 25, 2005
Messages
719
Office Version
  1. 2010
Platform
  1. Windows
Hi:

Could you help me rewrite formula in column F to allow 2nd, 3rd…occurrence of lookup value return blank cell?
Thank you for your help.

Sean

Book2
BCDEFGHIJKL
2Tom1
3Peter2Tom1
4Tom3Tom12nd, 3rd…occurrence of lookup value should return blank cell
5Peter4peter2
6Paul5peter22nd, 3rd…occurrence of lookuo value should return blank cell
Sheet1
Cell Formulas
RangeFormula
F3:F6F3=INDEX($C$2:$C$6,MATCH(E3,$B$2:$B$6,0))
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Try either of the following in cell F3, then copy down as needed:

Excel Formula:
=IF(COUNTIF($E$3:E3,E3)=1,INDEX($C$2:$C$6,MATCH(E3,$B$2:$B$6,0)),"")

//OR

=IF(ISERR(E3 INDEX($E$3:E3,MATCH(E3,$E$3:E3,0))),"",INDEX($C$2:$C$6,MATCH(E3,$B$2:$B$6,0)))

Please note, the space (intersection operator) between E3 and INDEX in the second formula is required for this method to work.
 
Upvote 0
Solution
Hi:

If lookup value is not in lookup list, Excel returns #N/A. Can formula in post #3 be adapted to return a
blank cell if lookup value does not exist?
 
Upvote 0
Try
Excel Formula:
=IF(COUNTIF($E$3:E3,E3)=1,IFNA(INDEX($C$2:$C$6,MATCH(E3,$B$2:$B$6,0)),""),"")
 
Upvote 0
@Peter_SSs
My version of Excel does not have IFNA so I replaced it with IFERROR. Formula in post #5 returns blank cell for #N/A error.
I can't mark post #5 as solution as it will replace post #2 as solution. :(
 
Upvote 0
My version of Excel does not have IFNA
:oops: Sorry about that. I thought that I checked your version but obviously didn't or didn't do it correctly. :cool:

Anyway, you fixed it up with IFERROR (y)

I can't mark post #5 as solution as it will replace post #2 as solution. :(
It isn't a problem - post #2 answers the original question so it's fine to mark that. :)
 
Upvote 0

Forum statistics

Threads
1,224,749
Messages
6,180,725
Members
452,995
Latest member
isldboy

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