ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Combining Variables Into A Single Output Cell (https://www.excelbanter.com/excel-programming/383222-combining-variables-into-single-output-cell.html)

Chergh

Combining Variables Into A Single Output Cell
 
Hi Folks,

I've been working with some database data which stores the date as an
integer (a different integer to that which Excel uses). To calculate the day,
month and year I do the following calculations:

y = Fix(ActiveCell / 65536)
m = Fix((ActiveCell - (y * 65536)) / 256)
d = Fix((ActiveCell - (y * 65536)) - (m * 256))

I now want to combine d, m and y into a single cell in the format off
dd/mm/yyyy but don't have a clue how anyone able to help?

Don Guillett

Combining Variables Into A Single Output Cell
 
vba help index
DateSerial Function


Returns a Variant (Date) for a specified year, month, and day.

Syntax

DateSerial(year, month, day)


--
Don Guillett
SalesAid Software

"Chergh" wrote in message
...
Hi Folks,

I've been working with some database data which stores the date as an
integer (a different integer to that which Excel uses). To calculate the
day,
month and year I do the following calculations:

y = Fix(ActiveCell / 65536)
m = Fix((ActiveCell - (y * 65536)) / 256)
d = Fix((ActiveCell - (y * 65536)) - (m * 256))

I now want to combine d, m and y into a single cell in the format off
dd/mm/yyyy but don't have a clue how anyone able to help?




Chergh

Combining Variables Into A Single Output Cell
 
Thanks very much works perfectly :)

"Don Guillett" wrote:

vba help index
DateSerial Function


Returns a Variant (Date) for a specified year, month, and day.

Syntax

DateSerial(year, month, day)


--
Don Guillett
SalesAid Software

"Chergh" wrote in message
...
Hi Folks,

I've been working with some database data which stores the date as an
integer (a different integer to that which Excel uses). To calculate the
day,
month and year I do the following calculations:

y = Fix(ActiveCell / 65536)
m = Fix((ActiveCell - (y * 65536)) / 256)
d = Fix((ActiveCell - (y * 65536)) - (m * 256))

I now want to combine d, m and y into a single cell in the format off
dd/mm/yyyy but don't have a clue how anyone able to help?





Don Guillett

Combining Variables Into A Single Output Cell
 
Wasn't sure but thought it would.

--
Don Guillett
SalesAid Software

"Chergh" wrote in message
...
Thanks very much works perfectly :)

"Don Guillett" wrote:

vba help index
DateSerial Function


Returns a Variant (Date) for a specified year, month, and day.

Syntax

DateSerial(year, month, day)


--
Don Guillett
SalesAid Software

"Chergh" wrote in message
...
Hi Folks,

I've been working with some database data which stores the date as an
integer (a different integer to that which Excel uses). To calculate
the
day,
month and year I do the following calculations:

y = Fix(ActiveCell / 65536)
m = Fix((ActiveCell - (y * 65536)) / 256)
d = Fix((ActiveCell - (y * 65536)) - (m * 256))

I now want to combine d, m and y into a single cell in the format off
dd/mm/yyyy but don't have a clue how anyone able to help?








All times are GMT +1. The time now is 12:34 PM.

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