Making a date out of three columns that are not necessarily filled.

mawilson12

New Member
Joined
Jan 17, 2008
Messages
35
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
I have a spreadsheet of Civil War veterans which I am trying to get into genealogy software. Converting into real dates is the first task. If I have an Excel spreadsheet that has Column D2 as a day of the month, E2 as the number month of a year and F2 is a year, what formula do I use to have a cell with the date expressed as (d)d/MMM /YYYY compensating for cells that may not have a day or month? Ideally if the day or month is missing, just do month/year or year accordingly. Otherwise, as close as I can get will be fine, even if the date is 1/1/Year.
 

Attachments

  • Ssample Screenshot 2023-05-13 192104.png
    Ssample Screenshot 2023-05-13 192104.png
    22.6 KB · Views: 16

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
In addition to what @JoeMo has provided, Due to the missing data for certain columns, I can only see a vba code approach to your solution, but I am not that good with formulas to begin with.
 
Upvote 0
BTW, believe it or not, I decided to try a formula approach, for now, just to help me learn a bit. The following is what I have come up with thus far for your data:

Book1
ABCDEFGHIJKL
1FnameMnameLnameBirthDayBirthMonthBirthYearDeathDayDeathMonthDeathYearAgeBest Birth Date
2WilliamAbbie18433118631/1/1843
3JamesB.Acton184110818961/1/1841
4SamuelAdams18447318671/1/1844
5ThomasAdams1839211118621/1/1839
6WilliamAdams2111865No Birth Date Available
7PaulAlbert58184525118655/8/1845
8WilliamD.Alden18291618651/1/1829
9JamesPercivalAllen2211842215191622/1/1842
10WilliamAllen18447518661/1/1844
11CalebL.Anderson182424818631/1/1824
12BartlettArmbruster2381843263192323/8/1843
13ChaunceyAtwell10111825137186410/11/1825
14FrancisBacheNo Birth Date Available
15JohnBooth2419059619972/4/1905
16
Sheet1
Cell Formulas
RangeFormula
K2:K15K2=IF(AND(D2=0,E2=0,F2<>0),"1/1/"&F2,IF(AND(D2=0,E2=0,F2=0),"No Birth Date Available",IF(AND(D2<>0,E2<>0,F2<>0),D2 & "/" & E2 & "/" & F2,"")))
 
Upvote 0
Solution
@mawilson12
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Also a good idea to provide sample data in a form that helpers can actually use to test solutions.
MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
@mawilson12
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Also a good idea to provide sample data in a form that helpers can actually use to test solutions.
MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
Thanks. Unfortunately, my Excel baulked at at the XLBB Add-in originally, indicating it didn't come from a signed source. I will update my account, however.
 
Upvote 0
@mawilston12 did the formula I provided not get you some dates to use as the birth date?
 
Upvote 0
my Excel baulked at at the XLBB Add-in originally, indicating it didn't come from a signed source.
So did you try to install it anyway given that we have hundreds if not thousands of users here using it without any security issues being apparent?

I will update my account, however.
Thank you for doing that. (y)

@mawilston12 did the formula I provided not get you some dates to use as the birth date?
If text dates are acceptable, then an alternative might be as follows.
If date order of m/d/y is required then swap the order of the two MAX functions in the formula.

23 05 14.xlsm
DEFJK
1BirthDayBirthMonthBirthYearAgeBest Birth Date
218431/1/1843
318411/1/1841
418441/1/1844
518391/1/1839
6No Birth Date Available
75818455/8/1845
818291/1/1829
9221184222/1/1842
1018441/1/1844
1118241/1/1824
12238184323/8/1843
131011182510/11/1825
14No Birth Date Available
152419052/4/1905
Dates
Cell Formulas
RangeFormula
K2:K15K2=IF(F2="","No Birth Date Available",MAX(D2,1)&"/"&MAX(E2,1)&"/"&F2)
 
Upvote 0
So did you try to install it anyway given that we have hundreds if not thousands of users here using it without any security issues being apparent?


Thank you for doing that. (y)
No, as at the time I was on a work computer, if you must know. No need for you to be a smart-aleck about it.

I appreciate you pointing out the additional information options, I hadn't noticed it as I was a user prior to the breach and I didn't recall that being there. Thanks for pointing out another option.
 
Upvote 0
@mawilson12 I think you combined two responses into one that doesn't reflect what @Peter_SSs said.

The 'Thank you for doing that" response was directed at you updating your account.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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