min in range if greater than 0

Trevor3007

Well-known Member
Joined
Jan 26, 2017
Messages
667
Office Version
  1. 365
Platform
  1. Windows
hello,

I need to display the minimum mileage in a range (a1:a39) that is greater than 0..

i tried
=if( a1:a39>0,MIN(C9:C38)) but that did not work.

please can someone help me to resolve?

thank you.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
how about
=MINIFS(a1:a39,A1:A39,">"&0)

why the different ranges in your statement ?

Book2
ABC
1
20MIN > 0
352
42
50
63
74
85
96
Sheet2
Cell Formulas
RangeFormula
C3C3=MINIFS(A2:A9,A2:A9,">"&0)


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
hello,

I need to display the minimum mileage in a range (a1:a39) that is greater than 0..

i tried
=if( a1:a39>0,MIN(C9:C38)) but that did not work.

please can someone help me to resolve?

thank you.
You were close. The formula works better this way:

Excel Formula:
=MIN(IF(A9:A38>0,C9:C38,""))

Or in the direction etaf was going:

Excel Formula:
=MINIFS(C9:C38,A9:A38,">"&0)

However, also as etaf was asking, why are the ranges of different sizes? They should be the same size for these formulas to work effectively.
 
Upvote 0
You were close. The formula works better this way:

Excel Formula:
=MIN(IF(A9:A38>0,C9:C38,""))

Or in the direction etaf was going:

Excel Formula:
=MINIFS(C9:C38,A9:A38,">"&0)

However, also as etaf was asking, why are the ranges of different sizes? They should be the same size for these formulas to work effectively.
great thank you.
that works for me
 
Upvote 0

Forum statistics

Threads
1,215,256
Messages
6,123,911
Members
449,132
Latest member
Rosie14

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