Small with If condition to return smallest value greater than 0

asad

Well-known Member
Joined
Sep 9, 2008
Messages
1,434
Hi All,

I have the below formula. It works fine if I have 25 values and it gives me the smallest value. But the problem is that more often than not, we have only 2, 3 or anywhere upto 10 values. So the result will always be o with the formula. Is there a way to resolve this?
Excel Formula:
=SMALL(IF(('Sessions list'!$N$1:$N$25=$B14)*(LEFT('Sessions list'!$B$1:$B$25,10)=TEXT(E$6,"dd.mm.yyyy")),'Sessions list'!$J$1:$J$25,0),1)
enetered with ctrl+shift+enter

Thanks
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Try.
Excel Formula:
=SMALL(IF(('Sessions list'!$N$1:$N$25=$B14)*(LEFT('Sessions list'!$B$1:$B$25,10)=TEXT(E$6,"dd.mm.yyyy")),'Sessions list'!$J$1:$J$25,""),1)
If you have 0 values in 'Sessions list'!$J$1:$J$25 and you don't want 0 as smallest value then
Excel Formula:
=SMALL(IF(('Sessions list'!$N$1:$N$25=$B14)*(LEFT('Sessions list'!$B$1:$B$25,10)=TEXT(E$6,"dd.mm.yyyy"))*('Sessions list'!$J$1:$J$25<>0),'Sessions list'!$J$1:$J$25,""),1)
 
Upvote 0
Solution
Try.
Excel Formula:
=SMALL(IF(('Sessions list'!$N$1:$N$25=$B14)*(LEFT('Sessions list'!$B$1:$B$25,10)=TEXT(E$6,"dd.mm.yyyy")),'Sessions list'!$J$1:$J$25,""),1)
If you have 0 values in 'Sessions list'!$J$1:$J$25 and you don't want 0 as smallest value then
Excel Formula:
=SMALL(IF(('Sessions list'!$N$1:$N$25=$B14)*(LEFT('Sessions list'!$B$1:$B$25,10)=TEXT(E$6,"dd.mm.yyyy"))*('Sessions list'!$J$1:$J$25<>0),'Sessions list'!$J$1:$J$25,""),1)
Thanks for looking into my formula issue.
But there are no 0s in the range. The way it calculates, if there are no matching arguments in the 2 conditions in my formula, the formula just calculates those cells to be 0 and then gives me 0 as the answer.
 
Upvote 0
Below is the screen shot of my data
 

Attachments

  • Capture.JPG
    Capture.JPG
    190.7 KB · Views: 5
Upvote 0
Thanks a lot kvsrinivasamurthy, first one actually works.
Sorry, I misunderstood your solutions but then looked again.
Thanks a lot.
 
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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