Simple formula that is driving me mad

churmie

New Member
Joined
Jan 9, 2014
Messages
44
ABC
1SalesClosing Stock
212/Dec2575
313/Dec3045
414/Dec450
515/Dec60-160
6
7Opening Stock100
8Runout????Needs to return 14/Dec

<tbody>
</tbody>

How do I get cell B8 to return the date 14/Dec as the date stock runs out? I have used IF formula but I am doing something wrong?

Thanks in advance...

Churmie
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
try this, confirm with shift-enter-return

=INDEX(A2:A5,MATCH(SMALL(IF(C2:C5>=0,C2:C5),1),C2:C5,0))
 
Upvote 0
You can get it with something like this:

=INDEX(A2:A5, MATCH(0, C2:C5, 0))

But it might just help to elaborate on if you are going to get more of this stock in the future and add it onto the bottom of this list?
 
Upvote 0
You can get it with something like this:

=INDEX(A2:A5, MATCH(0, C2:C5, 0))

But it might just help to elaborate on if you are going to get more of this stock in the future and add it onto the bottom of this list?


Excellent! I thought it might be an index question, thank you all all!
 
Upvote 0
That one is the least robust. It only works if your closing stock goes down to exactly zero. It appears to me your stock can go negative so i wouldnt use that one.
 
Upvote 0
That one is the least robust. It only works if your closing stock goes down to exactly zero. It appears to me your stock can go negative so i wouldnt use that one.

This is true. If this is the case then i would also recommend using one of the others provided as i was only attempting to provide when the closing stock hits exactly 0.
 
Upvote 0
this is not as simple as first look, let say you've 10 left over on the 14th, formula above yield different results


Book1
ABC
1SalesClosing Stock
212-Dec2575
313-Dec3045
414-Dec3510
515-Dec60-50
6
7Opening Stock100
8Runout14-Dec
915-Dec
10#N/A
Sheet1
Cell Formulas
RangeFormula
B9=INDEX(A2:A5,MATCH(TRUE,INDEX(C2:C5<=0,0),0))
B10=INDEX(A2:A5, MATCH(0, C2:C5, 0))
B8{=INDEX(A2:A5,MATCH(SMALL(IF(C2:C5>=0,C2:C5),1),C2:C5,0))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Forum statistics

Threads
1,215,464
Messages
6,124,966
Members
449,200
Latest member
Jamil ahmed

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