Hi
Hopefully a fairly simple issue to resolve...
I have worksheets that track some processes automatically getting information as actions occur by date. I am trying to modify the vba and am struggling to find a way to put an OFFSET in my formula.
In the simplified example below there are columns for date, action, requsted, started.
To get the "requested" dates, I use the following formula in vba which works just fine.
It returns the position # of the search of the Action column (B) when finding "Request" to the FILTER function for dates (A).
For reasons too long to explain, but in essence to keep inline with the existing coding. I would like to use the same method (ie stay in VBA and still use FILTER/SEARCH, but add OFFSET? unless not possible to get the date just one row after the "Request". Sometimes the input data isn't always perfect so I have found that sticking with the FILTER/SEARCH method always works to get the proper Requested date.
Goal: Use modified version of formula above to return the date offset by 1 row from when a request is make. This will indicate the production run start date which is always one business day from when requested.
Example below, hopefully it makes sense what I'm looking for.
Thanks!
Hopefully a fairly simple issue to resolve...
I have worksheets that track some processes automatically getting information as actions occur by date. I am trying to modify the vba and am struggling to find a way to put an OFFSET in my formula.
In the simplified example below there are columns for date, action, requsted, started.
To get the "requested" dates, I use the following formula in vba which works just fine.
It returns the position # of the search of the Action column (B) when finding "Request" to the FILTER function for dates (A).
VBA Code:
=FILTER($A$2:$A$20,ISNUMBER(SEARCH("Request",$B$2:$B$20)))
For reasons too long to explain, but in essence to keep inline with the existing coding. I would like to use the same method (ie stay in VBA and still use FILTER/SEARCH, but add OFFSET? unless not possible to get the date just one row after the "Request". Sometimes the input data isn't always perfect so I have found that sticking with the FILTER/SEARCH method always works to get the proper Requested date.
Goal: Use modified version of formula above to return the date offset by 1 row from when a request is make. This will indicate the production run start date which is always one business day from when requested.
Example below, hopefully it makes sense what I'm looking for.
Thanks!
Book2 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | |||
1 | Date | Action | Requested | Started | Requested | Started | ||||
2 | 8/3/2022 | InProd | 8/9/2022 | ? | 8/9/2022 | 8/10/2022 | ||||
3 | 8/4/2022 | InProd | 8/18/2022 | ? | 8/18/2022 | 8/19/2022 | ||||
4 | 8/5/2022 | InProd | 8/26/2022 | ? | 8/26/2022 | 8/29/2022 | ||||
5 | 8/8/2022 | Complete | ||||||||
6 | 8/9/2022 | Request | Desired result using vba/filter/search/offset? | |||||||
7 | 8/10/2022 | InProd | ||||||||
8 | 8/11/2022 | InProd | ||||||||
9 | 8/12/2022 | InProd | ||||||||
10 | 8/15/2022 | InProd | ||||||||
11 | 8/16/2022 | InProd | ||||||||
12 | 8/17/2022 | Complete | ||||||||
13 | 8/18/2022 | Request | ||||||||
14 | 8/19/2022 | InProd | ||||||||
15 | 8/22/2022 | InProd | ||||||||
16 | 8/23/2022 | InProd | ||||||||
17 | 8/24/2022 | InProd | ||||||||
18 | 8/25/2022 | Complete | ||||||||
19 | 8/26/2022 | Request | ||||||||
20 | 8/29/2022 | InProd | ||||||||
Sheet2 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
D2:D4,G2:G4 | D2 | =FILTER($A$2:$A$20,ISNUMBER(SEARCH("Request",$B$2:$B$20))) |
Dynamic array formulas. |