use =FILETER to exclude values in other ranges

smking204

New Member
Joined
Jan 28, 2021
Messages
29
Office Version
  1. 365
Platform
  1. Windows
I have a master list called StockCode on a tab called InvMaster. On a separate tab, I want to recreate the list in column B such that it will exclude any value found in columns A, C, or D.

I tried this formula, testing it only with column A, but it returned #VALUE!:

=FILTER(InvMaster[StockCode], (InvMaster[StockCode]<>A:A))

The only way I can get it to do anything is to replace A:A with a single cell (i.e., A12). How do I get it to filter out values from these three other ranges? Is =FILTER the best function to use? Thanks in advance for the help!
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Can you post a sample of your data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Can you post a sample of your data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
I don't think my work computer will let me, but the concept is pretty straightforward. I'll try to illustrate with this table. In this case, the filter in column B should return a list of 2, 4, 5, 6, and 7. But column F happens to be on a separate tab. When I try to recreate this oversimplified version on one tab in excel, I get a different error, #SPILL!, which doesn't make any sense to me because there's nothing obstructing the spill... Anyway, hope this is enough to work with. Thanks.

A​
B​
C​
D​
E​
F​
1=FILTER(F:F, F:F<>A:A)1
32
83
4
5
6
7
8
 
Upvote 0
Ok, how about
Excel Formula:
=FILTER(F1:F1000,(F1:F1000<>"")*(ISNA(MATCH(F1:F1000,A1:A10,0))))
 
Upvote 0
hmmm that's a step closer, for sure. But how can I exclude items from A, C, and D, rather than just A? I've tried a few things, like using OR in a few places. No luck so far...
 
Upvote 0
How about
Excel Formula:
=FILTER(F1:F1000,(F1:F1000<>"")*(ISNA(MATCH(F1:F1000,A1:A10,0)))*(ISNA(MATCH(F1:F1000,C1:C10,0)))*(ISNA(MATCH(F1:F1000,D1:D10,0))))
 
Upvote 0
Solution
Ok, I think that's the ticket. I did try that earlier, but I think there were formatting issues that were tripping it up. I tried using AND's and OR's, because I was getting confused :) Thanks a million!

While we're on the subject, I'll ask for a little more clarification: it seems like I can use * in place of AND() in some cases (but in other cases it still performs multiplication). Is there something similar to replace OR()? And feel free to correct any misunderstanding I'm showing. I had little luck googling these things.
 
Upvote 0
As that is an array calculation you need to use the array form of AND * alternatively for OR it's +
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,716
Members
448,985
Latest member
chocbudda

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