INDEX MATCH formula ignoring 0's

Gwill1983

Board Regular
Joined
Oct 24, 2018
Messages
123
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I have found several posts on here regarding finding the smallest number in a list and have tried to insert this information into my existing formula, but cannot make it work.

I reckon for an advanced user it will be a very simple formula adjustment.

My current formula is
=INDEX('Data Source'!$L$4:$L$55,MATCH(SMALL('Data Source'!$P$4:$P$55,G45),'Data Source'!$P$4:$P$55,0))

I would like this to remain the same, but only look for the lowest number that is greater than 0.

Can anybody help?

Thanks

Chris
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Try...

=INDEX('Data Source'!$L$4:$L$55,MATCH(SMALL(IF('Data Source'!$P$4:$P$55>0,'Data Source'!$P$4:$P$55),G45),'Data Source'!$P$4:$P$55,0))

...confirmed with CONTROL+SHIFT+ENTER.

Hope this helps!
 
Upvote 0
Brilliant! I think I had got there, but didn't do the CONTROL+SHIFT+ENTER trick!

Thanks for your help
 
Upvote 0
For a non-CSE approach....try this:

Code:
=INDEX('Data Source'!$L$4:$L$55,MATCH(SMALL('Data Source'!$P$4:$P$55,G45+COUNTIF('Data Source'!$P$4:$P$55,0)),'Data Source'!$P$4:$P$55,0))
Does that help?
 
Upvote 0
For a non-CSE approach....try this:

Code:
=INDEX('Data Source'!$L$4:$L$55,MATCH(SMALL('Data Source'!$P$4:$P$55,G45+COUNTIF('Data Source'!$P$4:$P$55,0)),'Data Source'!$P$4:$P$55,0))
Does that help?

Ron,
I'm trying to follow along here...I'm bit of a novice...
If I'm looking for a value in a table (different sheet) that would be updated based on the changes in column name, can I use this?

For example, in my data tab I have column headers with month&year and row headers with department name. Is possible to alter this to give me a different value if I chnage the month/year combo in a different sheet?

Thanks!
 
Upvote 0

Forum statistics

Threads
1,215,227
Messages
6,123,743
Members
449,116
Latest member
alexlomt

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