How do I create a "back in stock" date?

bcurrey

Board Regular
Joined
Aug 11, 2011
Messages
110
Office Version
  1. 365
Platform
  1. MacOS
I have a spreadsheet that keeps up with my estimated sales and inbound shipments. It use that data to give me an idea of week ending inventory levels to see if I'm going to have any stock outs.

Right now I have a "run out date" that shows the first date that a product should go out of stock. The formula I use to calculate this is in cell B2.

What I'd like to add is a "Back in stock date." This will return the first date that we have inventory AFTER a stockout. Cells C3:C5 have the expected output based on the dummy data below. In this example, Product A would have no dates for neither Run Out or Back In Stock because we had inventory the whole time.

Any ideas on how (and if) I can calculate this? I can't figure out how to tell Excel to check to see if prior cell was negative and current cell is positive then return the date in the header.

Appreciate the help!

ABCDEFGHIJ
1ProductRun Out DateBack In stock date5/105/175/245/316/76/146/21
2AIFERROR(INDEX($CV$2:$DI$2,MATCH(TRUE,$CV4:$DI4<0,0)),"")5004504235352442440
3B5/246/73005-100-2563550-20
4C5/316/21100130150-49-33-24553
5D6/76/21103454335-224-2475
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Book1
ABCDEFGHIJ
1ProductRun Out DateBack In stock date10-May17-May24-May31-May7-Jun14-Jun21-Jun
2A#N/A5004504235352442440
3B5/24/20216/7/20213005-100-2563550-20
4C5/31/20216/21/2021100130150-49-33-24553
5D6/7/20216/21/2021103454335-224-2475
Sheet1
Cell Formulas
RangeFormula
C2:C5C2=INDEX($D$1:$J$1,MATCH(1,($D2:$I2<0)*($E2:$J2>0),0)+1)
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Solution

Forum statistics

Threads
1,214,975
Messages
6,122,537
Members
449,088
Latest member
RandomExceller01

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