PC Review


Reply
Thread Tools Rate Thread

Combining Variables Into A Single Output Cell

 
 
=?Utf-8?B?Q2hlcmdo?=
Guest
Posts: n/a
 
      14th Feb 2007
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?
 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      14th Feb 2007
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
(E-Mail Removed)
"Chergh" <(E-Mail Removed)> wrote in message
news:C289A6BD-590F-4C5A-95E6-(E-Mail Removed)...
> 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?



 
Reply With Quote
 
=?Utf-8?B?Q2hlcmdo?=
Guest
Posts: n/a
 
      14th Feb 2007
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
> (E-Mail Removed)
> "Chergh" <(E-Mail Removed)> wrote in message
> news:C289A6BD-590F-4C5A-95E6-(E-Mail Removed)...
> > 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?

>
>
>

 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      14th Feb 2007
Wasn't sure but thought it would.

--
Don Guillett
SalesAid Software
(E-Mail Removed)
"Chergh" <(E-Mail Removed)> wrote in message
news:10E1AE78-4C1D-4D68-A917-(E-Mail Removed)...
> 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
>> (E-Mail Removed)
>> "Chergh" <(E-Mail Removed)> wrote in message
>> news:C289A6BD-590F-4C5A-95E6-(E-Mail Removed)...
>> > 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?

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combining Formula and Data Validation List in a Single Cell Benny Microsoft Excel Worksheet Functions 0 13th May 2008 09:48 PM
How to store variables of a single cell in a column? =?Utf-8?B?bm95YXU=?= Microsoft Excel Programming 5 25th Dec 2006 01:21 PM
From single cell variables to a single column serie =?Utf-8?B?bm95YXU=?= Microsoft Excel New Users 1 22nd Dec 2006 06:43 AM
Combining numerical and drop-down text in a single cell =?Utf-8?B?UmFpbmJvdy1MZW50aWw=?= Microsoft Excel Misc 0 17th May 2005 06:15 PM
Combining multiple cells into a single cell Antonio Stroman Microsoft Excel Discussion 5 12th Feb 2004 02:53 PM


Features
 

Advertising
 

Newsgroups
 


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