0

I am designing a spreadsheet which will use formulas to extract unique data from a column whilst also ignoring empty cells.

I am using the following formula to mark data as whether it should be used, or is a duplicate

=IF(B6<>"", IF(COUNTIF(B7:B$35,B6),"No","Yes"),"")

This works, but marks the last occurrence of duplicate data as the one to use. I need to use the first occurrence to preserve my preferred order.

E.g. the current formula will extract ABDC from A, B, C, D, C, because the last C occurs after the D. I need it to take the FIRST C to read ABCD.

1 Answer 1

1

Flip your locked range around, and check for "does this already exist above" instead of checking below.

To do this, change IF(COUNTIF(B7:B$36,B6),"No","Yes"), to IF(COUNTIF(B$1:B5,B6),"No","Yes") or IF(COUNTIF(B$1:B6,B6)>1,"No","Yes")

Sign up to request clarification or add additional context in comments.

1 Comment

Perfect, thanks so much - that's done the job. I tried reversing the range before but it didn't seem to do anything. I must have made a mistake, your formula works great :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.