Please be patient, I am still relatively new to VBA and have now hit Date problems.
I have a sheet of burial records, one column contains the death dates, many of which are post 1900 (13/03/1961), but a lot are pre 1900 (28 December 1874). Another column contains the age at death in various formats which in all cases I have been able to convert to a count of DAYS.
For output to a file for another program I need to calculate the birth date, i.e Death Date - age in days, as the majority of these will become pre 1900 dates this would be preferrable in Text date format e.g 15 February 1886.
My first thinking was to temporarily increase the century on all dates,
century = Val(Mid(deathdate, (Len(deathdate)-3),2))+1 subtract the age in days using Excel, decrease the century again by the same amount and construct a Text date.
My first problem was getting the date calculation to work,
birth = Val(Cells(r, 3)) - Val(cells(r,4)) does not work
where column 3 is 17/06/1978 and column 4 is 25915 which should give me 05/07/1907 but doesn't, without the VAL I still have the same problem.
All help and suggestions on the best way tp proceed gratfully received.
Thx in advance
Bookmarks