Calculate Lead Time - Critical Path.

Morpheus2022

New Member
Joined
Oct 4, 2022
Messages
8
Office Version
  1. 2019
Platform
  1. Windows
Hi,

So I have a spreadsheet with list of training related project actions / tasks that need to be completed by a certain date. I need to calculate the date based on a colour in a cell.

I've got a list of tasks in column A starting in cell A2
I need a formula in column B to calculate the days before impact based on the below condition and
I've got a list of dates across the top in row C1 to EB1 (Date Range from 03/10/2022 to 31/01/2023)
Underneath each date and in line with a task or action I want to place a coloured cell.
RED = Deadline before impact GREEN = Completed Action (Results in a Zero Value / Zero Impact)

I would like to create a Formula that analyses the row date range for a given task that detects whether a red or green cell is in the task row below the dates.
If a colour is detected, It refers to the date cell above it and returns the number of days between today and the target date in column B via a formula.

E.g. Cell A2 = (Action Item E.g. UAT Deadline Go No Go) B2 = Formula cell BX2 is shaded RED Date Reference Above the Red Cell is: 05/12/2022 = cell BX1

Formula reads something like:
=IF(Content of B3 to EB3 = RED, Then calculate =Today() - Cell Date BX1 (Returns the number of days between today and the 05/12/2022), IF(content of B3 to EB3 = Green, Formula result = "0" Days)

Is this possible. Many thanks in advance.
 

Attachments

  • Sample of Excel Sheet Requirements.png
    Sample of Excel Sheet Requirements.png
    46.8 KB · Views: 14

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Hi,
If it was me, I would put e.g. an "X" in the cell, instead of a color, and then use conditional format to color the cell(if cell value is X, then red color).
If so, you can use below formula:

Excel Formula:
=TODAY()-XLOOKUP("X",C2:EB2,$C$1:$EB$1)

If you stick to only use colors, below Youtube video explains how you can do so.


/Skovgaard
 
Upvote 0
Hi,
If it was me, I would put e.g. an "X" in the cell, instead of a color, and then use conditional format to color the cell(if cell value is X, then red color).
If so, you can use below formula:

Excel Formula:
=TODAY()-XLOOKUP("X",C2:EB2,$C$1:$EB$1)

If you stick to only use colors, below Youtube video explains how you can do so.


/Skovgaard
Thank you so much will give it a try and get back to you.
 
Upvote 0
OK so I tried what you have suggested based on the formula provided and the result returned is a #name? error.
My actual data ranges are as follows:

Cell containing formula = D3
Formula and data ranges cell row containing an X starts M3 to EB3 (Around 3 Months of data)
Cell range containing all of the dates to pull on starts at M1 to EB1 (Contain 3 Months of Dates 03/10/2022 to 30/01/2023)

Current formula entered into D3 =Today()-XLOOKUP("X",M3:EB3, $M$1:$EB$1)

#NAME? is the result.

What would you advise. At this point I can only assume that this is happening due to user error on my part.

Many thanks in advance for your assistance, greatly appreciated.
 
Upvote 0
Got to the route cause of the issue, the XLOOKUP command according to Microsoft is not possible in the Excel v2016 and 2019
Can you suggest another function that would yield the same results. Would an IF Function cut ... cell range -"X" then and so on. Just a thought.
 
Upvote 0
Sorry, forgot you didn't had Xlookup.
Try instead below (In E4 there is an "X"):

Book1
ABCDEFGH
1ActionDays03-10-202204-10-202205-10-202206-10-202207-10-202208-10-2022
2
3November
4Component8X
5Component
6Component
7Component
Sheet1
Cell Formulas
RangeFormula
B4B4=TODAY()-INDEX(C1:H7,1,MATCH("X",C4:H4,0))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C4:H7Expression=C4="X"textNO


/Skovgaard
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,895
Members
449,097
Latest member
dbomb1414

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