Sorting and Filtering

nikolaki

New Member
Joined
Oct 14, 2023
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Hi all:

Here is my formula:

Thanks in advance for any help!

=IF(J11=">=",
SORT(FILTER(A:F,(F:F>=I2)*(ABS(E:E)>I7)),6,1,FALSE),
SORT(FILTER(A:F,(F:F<=I3)*(ABS(E:E)>I7)),6,-1,FALSE))


I want to filter by values in F and Absolute values in E, and then and then sort results by Column 6, by ascending order if J11 =">=", else descending order .

I am getting a #VALUE! error. Uggh! :(
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
The most likely cause of your #VALUE error is your ABS function in turn caused by having a text value or empty string "" in column E.
See if this helps.
Excel Formula:
=IF(J11=">=",
SORT(FILTER(A:F,(F:F>=I2)*(IFERROR(ABS(E:E),0)>I7)),6,1,FALSE),
SORT(FILTER(A:F,(F:F<=I3)*(IFERROR(ABS(E:E),0)>I7)),6,-1,FALSE))

Or using LET
Excel Formula:
=LET(absV,IFERROR(ABS(E:E),0),
IF(J11=">=",
SORT(FILTER(A:F,(F:F>=I2)*(absV>I7)),6,1,FALSE),
SORT(FILTER(A:F,(F:F<=13)*(absV>I7)),6,-1,FALSE)))
 
Upvote 0
Solution
The most likely cause of your #VALUE error is your ABS function in turn caused by having a text value or empty string "" in column E.
See if this helps.
Excel Formula:
=IF(J11=">=",
SORT(FILTER(A:F,(F:F>=I2)*(IFERROR(ABS(E:E),0)>I7)),6,1,FALSE),
SORT(FILTER(A:F,(F:F<=I3)*(IFERROR(ABS(E:E),0)>I7)),6,-1,FALSE))

Or using LET
Excel Formula:
=LET(absV,IFERROR(ABS(E:E),0),
IF(J11=">=",
SORT(FILTER(A:F,(F:F>=I2)*(absV>I7)),6,1,FALSE),
SORT(FILTER(A:F,(F:F<=13)*(absV>I7)),6,-1,FALSE)))
Thanks a ton! You rule!
 
Upvote 0

Forum statistics

Threads
1,215,073
Messages
6,122,977
Members
449,095
Latest member
Mr Hughes

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