ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   "Date Format" v.s. "##/##/####" (https://www.excelbanter.com/excel-worksheet-functions/172704-date-format-v-s.html)

Neon520

"Date Format" v.s. "##/##/####"
 
Hi everyone,

Is it the same when you type in 01/01/2000 as in a date format AND when you
pick up three different numbers from three different cells and combine them
using & sign? For ex, A1 & "/" &A2 & "/" &A3.

If after combining the three number, will Excel still look at the combined
cell as a "date". I need to do some calculating with the combined cell, and
I want Excel to look at it as a date, let's say I need to calculate the age,
but the birth date need to be hidden. How can I do with this?

Thanks,
GU

David Biddulph[_2_]

"Date Format" v.s. "##/##/####"
 
=A1 & "/" &A2 & "/" &A3 will give text, rather than a date, but =--(A1 & "/"
&A2 & "/" &A3) will give a date (if the cell is formatted appropriately).
In some cases, if you try to do calculations based on the cell containing
text, it will translate it to a date in the calculation.
--
David Biddulph

"Neon520" wrote in message
...
Hi everyone,

Is it the same when you type in 01/01/2000 as in a date format AND when
you
pick up three different numbers from three different cells and combine
them
using & sign? For ex, A1 & "/" &A2 & "/" &A3.

If after combining the three number, will Excel still look at the combined
cell as a "date". I need to do some calculating with the combined cell,
and
I want Excel to look at it as a date, let's say I need to calculate the
age,
but the birth date need to be hidden. How can I do with this?

Thanks,
GU




David Biddulph[_2_]

"Date Format" v.s. "##/##/####"
 
Another option, of course, is =DATE(A3,A2,A1)
--
David Biddulph

"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
=A1 & "/" &A2 & "/" &A3 will give text, rather than a date, but =--(A1 &
"/" &A2 & "/" &A3) will give a date (if the cell is formatted
appropriately).
In some cases, if you try to do calculations based on the cell containing
text, it will translate it to a date in the calculation.


"Neon520" wrote in message
...
Hi everyone,

Is it the same when you type in 01/01/2000 as in a date format AND when
you
pick up three different numbers from three different cells and combine
them
using & sign? For ex, A1 & "/" &A2 & "/" &A3.

If after combining the three number, will Excel still look at the
combined
cell as a "date". I need to do some calculating with the combined cell,
and
I want Excel to look at it as a date, let's say I need to calculate the
age,
but the birth date need to be hidden. How can I do with this?

Thanks,
GU






Mike H

"Date Format" v.s. "##/##/####"
 
Hi,

Yes A1 & "/" &A2 & "/" &A3 will be a date and to demonstrate that add to to
it in another cell and that will be the next day.

For your age follow on with your logic and use this

=DATEDIF(A1 & "/" &A2 & "/" &A3,TODAY(),"y")

Mike

"Neon520" wrote:

Hi everyone,

Is it the same when you type in 01/01/2000 as in a date format AND when you
pick up three different numbers from three different cells and combine them
using & sign? For ex, A1 & "/" &A2 & "/" &A3.

If after combining the three number, will Excel still look at the combined
cell as a "date". I need to do some calculating with the combined cell, and
I want Excel to look at it as a date, let's say I need to calculate the age,
but the birth date need to be hidden. How can I do with this?

Thanks,
GU


Gary''s Student

"Date Format" v.s. "##/##/####"
 
say A1 has 1
say A2 has 18
say A3 has 2000

=DATE(A3,A1,A2) will display as 1/18/2000 - an Excel-style date
--
Gary''s Student - gsnu200765


"Neon520" wrote:

Hi everyone,

Is it the same when you type in 01/01/2000 as in a date format AND when you
pick up three different numbers from three different cells and combine them
using & sign? For ex, A1 & "/" &A2 & "/" &A3.

If after combining the three number, will Excel still look at the combined
cell as a "date". I need to do some calculating with the combined cell, and
I want Excel to look at it as a date, let's say I need to calculate the age,
but the birth date need to be hidden. How can I do with this?

Thanks,
GU


Neon520

"Date Format" v.s. "##/##/####"
 
Thanks Mike and Gary's Student, that's really helpful!!!

"Mike H" wrote:

Hi,

Yes A1 & "/" &A2 & "/" &A3 will be a date and to demonstrate that add to to
it in another cell and that will be the next day.

For your age follow on with your logic and use this

=DATEDIF(A1 & "/" &A2 & "/" &A3,TODAY(),"y")

Mike

"Neon520" wrote:

Hi everyone,

Is it the same when you type in 01/01/2000 as in a date format AND when you
pick up three different numbers from three different cells and combine them
using & sign? For ex, A1 & "/" &A2 & "/" &A3.

If after combining the three number, will Excel still look at the combined
cell as a "date". I need to do some calculating with the combined cell, and
I want Excel to look at it as a date, let's say I need to calculate the age,
but the birth date need to be hidden. How can I do with this?

Thanks,
GU



All times are GMT +1. The time now is 09:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com