Forum Discussion
Compare 2 columns and extract data to another sheet
I am looking for a formula or a short code for
comparing column 5 (Unique) values with column 4 in Sheet 1 of Workbook and if they are equal that row should be copied to Sheet 2 which will be my output sheet.
Column 5 Will have a unique value
Column 4 might have duplicates
the below is an example data set - the values will be of 6 or 8 digit random numbers for column 5 and 4
7 Replies
- OliverScheurichGold Contributor
=FILTER(A1:D17;(D1:D17=45)+(D1:D17=46)+(D1:D17=47)+(D1:D17=48)+(D1:D17=10))
With Office365 or 2021 you can apply Filter function. With other versions of excel you can use advanced filter.
- karth1109Copper Contributor
Thanks for the help , but actually my column 5 will have 100-200 unique values which needs to check against 49000 values in Column 4- is it possible to have range of the column in place of number 45 , 46 , 47, 48?
- OliverScheurichGold Contributor
=FILTER(A2:D17;((D2:D17>=45)*(D2:D17<=48))+(D2:D17=10))
With Office365 or 2021 it is above formula i should say in addition.