Formulas for blank and medians

Bazabelle

New Member
Joined
Oct 6, 2022
Messages
34
Office Version
  1. 365
Platform
  1. Windows
I have 2 formulas, i get Spill error

1. I need to return a date from a column if empty go to the other this within a range of data

=IF('Merged!A:A=A3, Min('Merged'!L:L, Merged'!J:J, "")

2. I want to calculate the median for a range

=IF('Merged!A:A=A3, Median('Merged'!P:P), "")

Thanks in advance.
Sorry i am not able to add sheets in my post
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
How about
Excel Formula:
=IFERROR(MIN(FILTER(CHOOSECOLS(Merged!J1:L1000,1,3),Merged!A1:A1000=A3,"")),"")
and
Excel Formula:
=IFERROR(MEDIAN(FILTER(Merged!P1:P1000,Merged!A1:A1000=A3,"")),"")
 
Upvote 0
It seem to work! (Need to cross check data)

For the first, sometimes it returns 0-Jan-00, i know if I "=0", "" would work but with a iferror condition, how you do insert?
 
Upvote 0
How about
Excel Formula:
=IFERROR(1/1/(MIN(FILTER(CHOOSECOLS(Merged!J1:L1000,1,3),Merged!A1:A1000=A3,""))),"")
 
Upvote 0
Solution
That fix those but then turns the one that data was accurate to 00-Jan-00
 
Upvote 0
In that case can you post some sample data that shows the problem.

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
I found it, I just replaced the iferror by if then the min formula =0 to return "" and as false to return the min formula!

=IF(MIN(FILTER(CHOOSECOLS(Merged!J1:L1000,1,3),Merged!A1:A1000=A3,""))=0,"",MIN(FILTER(CHOOSECOLS(Merged!J1:L1000,1,3),Merged!A1:A1000=A3,"")))
 
Upvote 0
Glad you sorted it & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,213,501
Messages
6,114,010
Members
448,543
Latest member
MartinLarkin

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