Only First of Multiple Search Functions Working Inside of Filter Formula???

c.clavin

Board Regular
Joined
Mar 22, 2011
Messages
126
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hi guys, I'm running into a weird issue where I have 2 Search functions in a Filter function formula and it's only returning the results of the first Search function. Do you have any idea what's going on here? This is my formula. I tested them each independently, and they return the proper results. Any help would be greatly appreciated. Thanks!

=FILTER('ITEM LUT'!EQ3:EQ100,(ISNUMBER(SEARCH('VARIABLE LUT'!$B$7,'ITEM LUT'!$EP$3:$EP$100)*(ISNUMBER(SEARCH('VARIABLE LUT'!$B$29,'ITEM LUT'!$EP$3:$EP$100))))))
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
I believe the right parentheses on your first ISNUMBER is misplaced...should be after the first 'ITEM LUT'!$EP$3:$EP$100)...check both right parentheses for that 1st expression.
Excel Formula:
=FILTER('ITEM LUT'!EQ3:EQ100,
(ISNUMBER(SEARCH('VARIABLE LUT'!$B$7,'ITEM LUT'!$EP$3:$EP$100)))*
(ISNUMBER(SEARCH('VARIABLE LUT'!$B$29,'ITEM LUT'!$EP$3:$EP$100)))  )
 
Last edited:
Upvote 1
Solution
I'm guessing a bit here but is this formula on the 'VARIABLE LUT' worksheet?

If so, you could/should shorten that formula by removing references to that worksheet. Other shortening included here as well
Excel Formula:
=LET(EP,'ITEM LUT'!$EP$3:$EP$100,FILTER('ITEM LUT'!EQ3:EQ100,ISNUMBER(SEARCH($B$7,EP)*SEARCH($B$29,EP))))

If I was wrong about the worksheet the formula is on then still ..
Excel Formula:
=LET(EP,'ITEM LUT'!$EP$3:$EP$100,FILTER('ITEM LUT'!EQ3:EQ100,ISNUMBER(SEARCH('VARIABLE LUT'!B7,EP)*SEARCH('VARIABLE LUT'!B29,EP))))
 
Upvote 1
You're welcome...we're happy to help. If you are interested in trimming down the formula, have a look at Peter's suggestion. At a minimum, you could eliminate some of the redundancy since you are searching the same range (so that gets defined once with a short name like EP), and then the two search arrays can be multiplied together before converting them to TRUEs and FALSEs...which will produce a single array consisting of errors and some numbers. Then the resultant array is converted into an array of TRUEs and FALSEs with ISNUMBER, thereby eliminating one of the ISNUMBER operations.
 
Upvote 0
@c.clavin
I notice that you have visited this thread since my previous post but not answered or commented on my question about the sheet name that the formula is on. If it is on the 'VARIABLE LUT' worksheet then I want to point out that leaving that sheet name out of the formula is not just so the formula is shorter, but including the sheet name of the sheet that a formula is on is actually a bad idea and can lead to incorrect results in some cases.
 
Upvote 0
@c.clavin
I notice that you have visited this thread since my previous post but not answered or commented on my question about the sheet name that the formula is on. If it is on the 'VARIABLE LUT' worksheet then I want to point out that leaving that sheet name out of the formula is not just so the formula is shorter, but including the sheet name of the sheet that a formula is on is actually a bad idea and can lead to incorrect results in some cases.
Hi, thanks for your post. I will review all of these references in the workbook!
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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