So I have a sheet where I have some dates and some results, I am trying to combine a few different formulas into a single one so that I don't have to look at several columns to get my results.
When I have the formulas separated, it works fine, but when I try to combine them, I don't get the expected results.
Initial Date: 02/28/2018
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]TEST1[/TD]
[TD]TEST2[/TD]
[TD]Adjusted Date[/TD]
[TD]Results[/TD]
[TD]Type[/TD]
[TD]Start[/TD]
[TD]End[/TD]
[TD]Days[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]02/28/2018 - PASS[/TD]
[TD]02/28/2018 - TRUE[/TD]
[TD]02/28/2018[/TD]
[TD]TRUE[/TD]
[TD]Red[/TD]
[TD]01/28/16[/TD]
[TD]03/01/16[/TD]
[TD]33[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]04/02/2018 - PASS[/TD]
[TD]04/02/2018 - TRUE[/TD]
[TD]04/02/2018[/TD]
[TD]TRUE[/TD]
[TD]Blue[/TD]
[TD]03/02/16[/TD]
[TD]04/19/16[/TD]
[TD]49[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]07/24/2018 - PASS[/TD]
[TD]07/24/2018 - TRUE[/TD]
[TD]07/24/2018[/TD]
[TD]TRUE[/TD]
[TD]Yellow[/TD]
[TD]06/16/16[/TD]
[TD]10/06/16[/TD]
[TD]113[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]09/30/2018 - PASS[/TD]
[TD]09/30/2018 - TRUE[/TD]
[TD]09/30/2018[/TD]
[TD]TRUE[/TD]
[TD]Blue[/TD]
[TD]09/10/17[/TD]
[TD]03/09/18[/TD]
[TD]181[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]09/30/2018 - PASS[/TD]
[TD]09/30/2018 - TRUE[/TD]
[TD]09/30/2018[/TD]
[TD]TRUE[/TD]
[TD]Red[/TD]
[TD]03/13/18[/TD]
[TD]05/11/18[/TD]
[TD]60[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]09/30/2018 - PASS[/TD]
[TD]09/30/2018 - FALSE[/TD]
[TD]09/30/2018[/TD]
[TD]FALSE[/TD]
[TD]Red[/TD]
[TD]07/26/18[/TD]
[TD]10/01/18[/TD]
[TD]68[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Ok, I will try and explain it best I can.
The Adjusted Date:
Basically, if the Type is "Blue", take the # of days from the same row and add it to the adjusted date from the row above.
The Results:
Basically, if the adjusted date from the same row is greater than or equal to the end date of the same row, then true, else false.
TEST2:
Just a simple concatenation of the Adjusted Date and Results, giving me the Date and the results.
TEST1:
What I would like for Test1 to do is basically do columns C, D, and B into one single formula.
Except instead of TRUE or FALSE, I want it to say PASS or FAIL.
However, because the TEST1 outputs are comprised of a date and text combined, I have to use some Text(Left(Find to isolate just the date do do my additions and comparisons.
Also, because I want the True/False to be Pass/Fail, I have to use an IF statement to achieve that (unless there is a different way).
So basically this is what I have for TEST 1:
I get the correct dates, but it says PASS for every single one, when really, it should say FAIL on the last one, if not more.
My data set is quite a bit larger than the example above.
I have gone over it probably a good 20 times, reworked it multiple times, broken it out to its simplest forms, and tried piecing it all together.
The smaller pieces work, but putting it together just isn't for some reason.
I don't want to use helper or hidden columns if I can avoid it.
Any thoughts, pointers, ideas?
I bet it is something super simple like forgetting a close parenthesis or a missing quote, or something .... hahahahahahaha
Thanks in advance for your help!
-Spydey
When I have the formulas separated, it works fine, but when I try to combine them, I don't get the expected results.
Initial Date: 02/28/2018
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]TEST1[/TD]
[TD]TEST2[/TD]
[TD]Adjusted Date[/TD]
[TD]Results[/TD]
[TD]Type[/TD]
[TD]Start[/TD]
[TD]End[/TD]
[TD]Days[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]02/28/2018 - PASS[/TD]
[TD]02/28/2018 - TRUE[/TD]
[TD]02/28/2018[/TD]
[TD]TRUE[/TD]
[TD]Red[/TD]
[TD]01/28/16[/TD]
[TD]03/01/16[/TD]
[TD]33[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]04/02/2018 - PASS[/TD]
[TD]04/02/2018 - TRUE[/TD]
[TD]04/02/2018[/TD]
[TD]TRUE[/TD]
[TD]Blue[/TD]
[TD]03/02/16[/TD]
[TD]04/19/16[/TD]
[TD]49[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]07/24/2018 - PASS[/TD]
[TD]07/24/2018 - TRUE[/TD]
[TD]07/24/2018[/TD]
[TD]TRUE[/TD]
[TD]Yellow[/TD]
[TD]06/16/16[/TD]
[TD]10/06/16[/TD]
[TD]113[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]09/30/2018 - PASS[/TD]
[TD]09/30/2018 - TRUE[/TD]
[TD]09/30/2018[/TD]
[TD]TRUE[/TD]
[TD]Blue[/TD]
[TD]09/10/17[/TD]
[TD]03/09/18[/TD]
[TD]181[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]09/30/2018 - PASS[/TD]
[TD]09/30/2018 - TRUE[/TD]
[TD]09/30/2018[/TD]
[TD]TRUE[/TD]
[TD]Red[/TD]
[TD]03/13/18[/TD]
[TD]05/11/18[/TD]
[TD]60[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]09/30/2018 - PASS[/TD]
[TD]09/30/2018 - FALSE[/TD]
[TD]09/30/2018[/TD]
[TD]FALSE[/TD]
[TD]Red[/TD]
[TD]07/26/18[/TD]
[TD]10/01/18[/TD]
[TD]68[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Ok, I will try and explain it best I can.
The Adjusted Date:
- C2 is always the Initial date
- C3:C is calculated as follows:
- =If(E3="Blue",$C2+$H3,$C2)
Basically, if the Type is "Blue", take the # of days from the same row and add it to the adjusted date from the row above.
The Results:
- D2 is always TRUE
- D3:D is calculated as follows:
- =C3>=G3
Basically, if the adjusted date from the same row is greater than or equal to the end date of the same row, then true, else false.
TEST2:
- =Text(C2,"mm/dd/yy")&" - "&D2
Just a simple concatenation of the Adjusted Date and Results, giving me the Date and the results.
TEST1:
What I would like for Test1 to do is basically do columns C, D, and B into one single formula.
Except instead of TRUE or FALSE, I want it to say PASS or FAIL.
However, because the TEST1 outputs are comprised of a date and text combined, I have to use some Text(Left(Find to isolate just the date do do my additions and comparisons.
Also, because I want the True/False to be Pass/Fail, I have to use an IF statement to achieve that (unless there is a different way).
So basically this is what I have for TEST 1:
- A2 is as follows:
- =TEXT(InitialDate,"mm/dd/yyyy")&" - "&If(InitialDate>=EndDate,"Pass","Fail")
- Works as expected
- =TEXT(InitialDate,"mm/dd/yyyy")&" - "&If(InitialDate>=EndDate,"Pass","Fail")
- A3:A are as follows:
- =If(E3="Blue",Text(Left(A2,Find(" ",A2,1)-1))+H3,"mm/dd/yyyy")&" - "&If(Text(Left(A2,Find(" ",A2,1)-1))+H3,"mm/dd/yyyy")>=G3,"Pass","Fail"),Text(Left(A2,Find(" ",A2,1)-1)),"mm/dd/yyyy")&" - "&If(Text(Left(A2,Find(" ",A2,1)-1)),"mm/dd/yyyy")>=G3,"Pass","Fail"))
- Also, there is an additional part in the above formula where if E3 doesn't equal "Blue, then I have to figure out if the above date is greater or equal to the End date of the same row and place a corresponding pass/fail.
I get the correct dates, but it says PASS for every single one, when really, it should say FAIL on the last one, if not more.
My data set is quite a bit larger than the example above.
I have gone over it probably a good 20 times, reworked it multiple times, broken it out to its simplest forms, and tried piecing it all together.
The smaller pieces work, but putting it together just isn't for some reason.
I don't want to use helper or hidden columns if I can avoid it.
Any thoughts, pointers, ideas?
I bet it is something super simple like forgetting a close parenthesis or a missing quote, or something .... hahahahahahaha
Thanks in advance for your help!
-Spydey
Last edited: