Continuous Date

%3CLINGO-SUB%20id%3D%22lingo-sub-2150235%22%20slang%3D%22en-US%22%3EContinuous%20Date%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2150235%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20currently%20trying%20to%20find%20a%20function%20or%20formula%20that%20can%20assist%20me%20with%20calculating%20a%20continuous%20date%20using%20multiple%20rows%20(if%20there).%20Can%20anyone%20assist%20me%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ei.e.%20I%20would%20like%20for%20it%20to%20consolidate%20the%20date%20and%20return%20a%20single%20date%20of%2012%2F15%2F2020%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B09%2F30%2F2021%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E123456789%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20DOE%20JANE%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B12%2F15%2F2020%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B12%2F31%2F2020%26nbsp%3B%20%26nbsp%3B16days%3C%2FP%3E%3CP%3E123456789%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20DOE%20JANE%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B01%2F01%2F2021%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B09%2F30%2F2021%26nbsp%3B%20%26nbsp%3B270%20days%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2150235%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2150290%22%20slang%3D%22en-US%22%3ERe%3A%20Continuous%20Date%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2150290%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F972659%22%20target%3D%22_blank%22%3E%40mclovings%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20do%20date%20math%20quite%20easily.%20(By%20the%20way%2C%20the%20term%20%22continuous%20date%22%20isn't%20one%20I%20recognize...you%20use%20it%20as%20if%20it's%20common%20speech).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFrom%20what%20you're%20showing%2C%20if%20it's%20the%20'16%20days%22%20you%20want%20to%20have%20calculated%2C%20you%20could%20simply%20enter%20the%20formula%20%3DD1-C1%20(assuming%20columns%20begin%20in%20your%20layout%20with%20A)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%2C%20on%20the%20other%20hand%2C%20you%20want%20to%20know%20what%20date%20is%2016%20days%20after%2012%2F15%2F2020%20(and%20that%20latter%20date%20is%20in%20cell%20C1)%2C%20just%20enter%20the%20formula%20%3DC1%2B16%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYour%20second%20sentence%20doesn't%20really%20make%20sense.%20Oh%2C%20maybe%20you're%20saying%20you%20want%20a%20field%20to%20read%3C%2FP%3E%3CP%3E12%2F15%2F2020--9%2F30%2F2021%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%20if%20that's%20the%20case%2C%20that%20gets%20a%20little%20tricky%20but%20here's%20how%20to%20do%20it.%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3DCONCATENATE(TEXT(C3%2C%22mm%2Fdd%2Fyyyy%22)%2C%22--%22%2CTEXT(D3%2C%22mm%2Fdd%2Fyyyy%22))%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3Eassuming%20the%20first%20date%20is%20in%20C3%2C%20the%20second%20in%20D3.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

I would like to use a formula that could use a specific linking factor such as a SSN/Name and would be able to dictate whether or not the dates are continuous without a break and give me a consolidated date. Any assistance is greatly appreciated.

11 Replies

@mclovings 

 

You can do date math quite easily. (By the way, the term "continuous date" isn't one I recognize...you use it as if it's common speech).

 

From what you're showing, if it's the '16 days" you want to have calculated, you could simply enter the formula =D1-C1 (assuming columns begin in your layout with A)

 

If, on the other hand, you want to know what date is 16 days after 12/15/2020 (and that latter date is in cell C1), just enter the formula =C1+16

 

Your second sentence doesn't really make sense. Oh, maybe you're saying you want a field to read

12/15/2020--9/30/2021

 

Now if that's the case, that gets a little tricky but here's how to do it.

=CONCATENATE(TEXT(C3,"mm/dd/yyyy"),"--",TEXT(D3,"mm/dd/yyyy")) 

assuming the first date is in C3, the second in D3.

 

@mclovings 

I didn't understand what exactly you were trying to do.

It would be advantageous if you insert a file (without sensitive data) and explain your plans in detail with regard to this file.

 

Perhaps these examples will help you solve your problem.

 

@NikolinoDE I would like to use a formula that could use a specific linking factor such as a SSN and would be able to dictate whether or not the dates are continuous without a break and give me a consolidated date. Does this make sense?

@mathetes I would like to use a formula that could use a specific linking factor such as a SSN and would be able to dictate whether or not the dates are continuous without a break and give me a consolidated date. Does this make sense?

Excuse me, but I'm not a specialist in Social Security Nummbers (SSN).
In the file, please explain in detail what exactly and in which cell what you want to accomplish.
Please keep in mind that we too are ignorant of the knowledge of others.

Should only the days be calculated. from start and end date?
If it is to be linked to SSN, then how?

Thank you for your understanding and patience

Nikolino
I know I don't know anything (Socrates)

@mclovings 

 

Not totally. Your spreadsheet gives data, but what would really be helpful is to take that raw data and use it to illustrate what you mean by "continuous without a break" --illustrating it both ways --

 

The consolidated date is, I'm going to presume unless you correct me, is what I gave you in my first answer. Not really what I'd call a "consolidated date" (it is, after all, two dates) but a single text field that has concatenated (strung together) two separate texts, each of which is a date, with a separator. If that's what you mean, then you have that formula. If it's not what you mean, what do you mean?

@mathetes  I attached an update with what I'm seeking to accomplish in column E (showing continuous data). If the previous end date is 02/17/2021 and the new start date is 02/19/2021, then it's not continuous. A gap, or a break is there and it shouldn't calculate. However, if it's continuous, then the new end date replaces the old end date.

@NikolinoDE I would like the formula to use a specific linking factor and analyze the start and end dates and if they are concurrent and don't have a day gap. For instance, JANE DOE's end date is 12/31/2020 and her new start date is 01/01/2021, therefore the date is continuous and the old end date of 12/31/2020 is null and void and the new end date is 09/30/2021. The example for Jill Doe has a break after 11/30/2020, therefore I know it's not consecutive, but the next dates are in the realm of the aforementioned scenario.

@mclovings 

a) I know the meaning of the word continuous

b) 1/1/21 is not continuous with 12/31/21  (in the Doe, Jane data)

 

Now, I realize that was a typo on your part; I'm a human who can interpret and discern what was meant from the larger context. A computer, however (until AI gets more developed and implemented in Excel) would NOT know that it was a typo.

 

Anyway, another question before answering (which will have to come later; I'm going into another meeting in just a few minutes): you show Doe, Jane in contiguous lines. same with doe, Jill. Is that line-by-line alphabetical sort (or sort by SSN) something that your real database will reflect, or will the rows in fact get mixed, so that it could be something like:

Doe, Jill

Doe, Jane

Doe, Jill

Doe, Jil

Doe Jane

Doe, John

@mathetes the data is hard data from a system, so I won't be manipulating any numbers. I can sort by name or SSN, but at the moment, I have it sorted by SSN. I won't be mixing them.

@mclovings 

 

Here, first, is a very simple solution that will work if the example you've given is universally true. Which is to say, this will work so long as there are never more than two rows in a row that should be considered continuous dates.

 

If that's not valid, then we'll have to get potentially a lot more complicated, but I didn't see any reason to do that yet. We'd have to start testing rows for such things as

  • count the number of rows where SSN stays consistent
    • (what's the maximum of rows for any given SSN in your data; is there a limit?)
  • test each sequence of dates for any given SSN for continuity
    • (are they always in date sequence or could continuity be there be rows for the same SSN but separated by an intervening row?)

So I need to ask: do we need to get more sophisticated in potential complications hinted at by those questions? What, if any, limits are there to numbers of rows per SSN, especially to numbers of rows per SSN that could be continuous?