Custom ADV Filter with IF Function

BarryBob

New Member
Joined
Mar 21, 2013
Messages
1
I'm trying to use a adv filter to pull out, in a separate table, items from a table which meet a criteria based on a formula

ie. the criteria should look at 'starting column' F, and is only if that number is smaller than the sum of columns D & E.
If tried a IF Formula but cant seem to get it to work.

=IF($F1<($E2+$D2),"ok","SHORT")

The IF formula seems to work by its self, but i cannot seem to get it to work with the adv filter.

ABCDEFgh
1
GroupItemUnitStandard kitAdditional requestStartingStarting
2HQHole PunchPack242=IF($F1<($E2+$D2)
,"ok","SHORT")
3HQFoldereach10010
4HQLockeach10210
5HQLampeach213

<tbody>
</tbody>

The adv filter is applied to the full table A1:F5 with the criteria in H2

Hope that makes sense.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Hi BarryBob and Welcome to the Board,

When using advanced filter with a formula-based criteria, the rows in the List Range that will be copied are those for which the formula evaluates to TRUE.

So one reason that you're not getting the desired results is that your formula will only evaluate to "ok" or "Short", so no TRUE rows will be copied.
Try replacing the formula in H2 with this...
=$F1<($E2+$D2)

You'll also need to have Cell H1 empty, then reference H1:H2 as the Criteria Range to get your desired result.

Just to illustrate the concept, this IF formula would also work; however that's a more complicated way to get the same result.
=IF($F1<($E2+$D2),TRUE,"Short")
 
Upvote 0

Forum statistics

Threads
1,214,868
Messages
6,122,005
Members
449,059
Latest member
mtsheetz

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