# Formula to skip cell if condition is true/false

1. ## Formula to skip cell if condition is true/false

I am trying to auto-generate the table shown in the attached Column E so that it dynamically updates if the data in Columns A, B, and C change. The goal is to skip duplicate values in Column B without having any blank rows generated in Column E. This is just a simple example but I would apply this formula to more complex worksheets if anyone has an answer. Thanks!  Register To Reply

2. ## Re: Formula to skip cell if condition is true/false

Try this in E2:

=IFERROR(INDEX(B\$2:B\$15,MATCH(0,COUNTIF(E\$1:E1,B\$2:B\$15),0)),"") Ctrl Shift Enter  Register To Reply

3. ## Re: Formula to skip cell if condition is true/false

It worked! Thank you!  Register To Reply

4. ## Re: Formula to skip cell if condition is true/false

You can put this formula in D2:

=IF(B2="","",IF(COUNTIF(B\$2:B2,B2)=1,MAX(D\$1:D1)+1,""))

and copy it down to the bottom of your table. You could set the font colour to white in this column if you don't want to see the numbers that the formula generates.

Then you can use this formula in E2:

=IFERROR(INDEX(B:B,MATCH(ROWS(\$1:1),D:D,0)),"")

and again, copy this down to the bottom of your table. If you then add a new Type on row 10 or below, then it will appear in column E automatically, but if the new entry is a duplicate then it won't show.

Hope this helps.

Pete  Register To Reply

5. ## Re: Formula to skip cell if condition is true/false

You're welcome. Thanks for the rep!  Register To Reply