MINS, Match, Index - ignore "0"'s or "-"'s

albert_de

New Member
Joined
Mar 16, 2020
Messages
35
Office Version
  1. 2021
Platform
  1. Windows
I am trying to create a spreadsheet that summarises our Weather Station’s raw data.

But I am struggling with data from the Weather Station that returns a “0” value or “-“ when no data was recorded by the weather station.

The attached Image helps to explain what I am trying to achieve.

Thank you for any direction that Members maybe able to offer me. I really am stuck!
 

Attachments

  • Weather Data.jpg
    Weather Data.jpg
    132.5 KB · Views: 10

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
As you have 2021 version, you may be able to use FILTER()
=MIN(FILTER(B1:B20,(B1:B20<>"")*(B1:B20<>0)))

I suspect a much better way to do this
=INDEX(A1:A20,MATCH(MIN(FILTER(B1:B20,(B1:B20<>"")*(B1:B20<>0))),B1:B20,0))

ALSO if 2 results , index/match will only bring back the 1st result and not both or more

what happens if more than 1 result with the same temp value in column B ?

Book8
ABCDE
1
2DATE-1-DATE-8
3DATE-21
4DATE-32
5DATE-40
6DATE-54
7DATE-60.1
8DATE-7-
9DATE-80.0001
10DATE-910
11DATE-1020
12DATE-110.001
Sheet1
Cell Formulas
RangeFormula
E2E2=INDEX(A1:A12,MATCH(MIN(FILTER(B1:B12,(B1:B12<>"")*(B1:B12<>0))),B1:B12,0))


BUT
Images are difficult to see , and also requires that I input all the data myself, which means I may make an error, which is very time consuming, and from my point of view less likely to get a response, if a complicated spreadsheet. Plus we cannot see any of the formulas used.

Therefore -

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

This will possibly enable a quicker and more accurate solution for you.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone
 
Upvote 0
you should also have LET()
so this should work and bring mutiple values of the MIN , also can be used for a single value
=LET(m,MIN(FILTER(B1:B12,(B1:B12<>"")*(B1:B12<>0))),FILTER(A1:A12,B1:B12=m))

OR in full
=FILTER(A1:A12,B1:B12=MIN(FILTER(B1:B12,(B1:B12<>"")*(B1:B12<>0))))


Book8
ABCDEFGHI
1MINSingle ValueLET - Multiple valuesWithout LET
2DATE-1-0.0001DATE-2DATE-2DATE-2
3DATE-20.0001DATE-8DATE-8
4DATE-32
5DATE-40
6DATE-54
7DATE-60.1
8DATE-7-
9DATE-80.0001
10DATE-910
11DATE-1020
12DATE-110.001
Sheet1
Cell Formulas
RangeFormula
D2D2=MIN(FILTER(B1:B12,(B1:B12<>"")*(B1:B12<>0)))
E2E2=INDEX(A1:A12,MATCH(MIN(FILTER(B1:B12,(B1:B12<>"")*(B1:B12<>0))),B1:B12,0))
G2:G3G2=LET(m,MIN(FILTER(B1:B12,(B1:B12<>"")*(B1:B12<>0))),FILTER(A1:A12,B1:B12=m))
I2:I3I2=FILTER(A1:A12,B1:B12=MIN(FILTER(B1:B12,(B1:B12<>"")*(B1:B12<>0))))
Dynamic array formulas.
 
Upvote 0
Thank you for your quick reply.

Here is a Dropbox Link to the Spreadsheet that I am creating. It Contains the Raw Data in the Raw Data tab. With query results being posted in the Summary and Records Tab.

You will see the "0" results on the Summary Tab in the Maximum Low results (e.g. E238 & E249.
The Records Tab is where I am trying to Index queries from the Raw Data by Year, whilst also ignoring "0" or "-" values

Regarding if there are 2 Temp's the same - that's OK. So long as one of those results is returned that would work.

Now I need to sit down and study what you have told me in your posts!

Thank you very much for your guidance
 
Upvote 0
Thanks, OK thats a lot more complicated then the image example - as you have merged cells and a mixture of various weather results
the rawdata sheet - the dates are TEXT , so that another complication - so a DATE>text to columns needed on that column to change to REAL dates / times

Raw data , does not have any - in the results , 0 can exist in that file

you could use column B of rawdata - to find the lowest value and the date/time ??? and also filter that by YEAR - is that an option?

having a bit of trouble working out whats going here , as quite a complicated spreadsheet


I also have a weather station - Watson - and uses ecowitt.net to produce the same sort of results
 
Upvote 0
Column B is an Average of Column C & D. So its not really a reflection Low data.

I will have a go with your formula's and see if I can move forward
 
Upvote 0
ok , i have been playing with your spreadsheet and not really found a solution

Not an average of C and D
see column E
so you want to use the MIN temp column C ??
HP2551 Weather Data v2.1.xlsx
BCDE
10699.88.313.410.9
107012.311.013.712.4
107113.911.017.614.3
107218.317.321.319.3
107317.115.018.716.9
107414.413.015.314.2
107513.712.814.513.7
107612.912.513.312.9
107714.312.419.916.2
107818.216.519.918.2
107917.115.319.517.4
108014.614.015.314.7
108113.513.114.313.7
108213.313.013.613.3
108315.313.218.916.1
108419.718.920.519.7
108518.716.121.118.6
108615.915.716.216.0
Raw Data
Cell Formulas
RangeFormula
E1069:E1086E1069=AVERAGE(C1069:D1069)
 
Upvote 0
Yes, I'm wanting to use Column C for Low Temp.
I have spent a while trying to figure how to exclude 0's. Maybe it can't be done?!
 
Upvote 0
I have spent a while trying to figure how to exclude 0's.
Hi, just add another criteria to your MINIFS() function - i.e. in E238 :
Rich (BB code):
=IF(E$237=TRUE,MINIFS('Raw Data'!$C$3:$C$30000,'Raw Data'!$C$3:$C$30000,"<>0",'Raw Data'!$A$3:$A$30000,"2022-08*"),"")
 
Upvote 0
Solution

Forum statistics

Threads
1,226,063
Messages
6,188,656
Members
453,489
Latest member
jessrw

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