PC Review


Reply
Thread Tools Rate Thread

Cell data change formatting

 
 
=?Utf-8?B?UGFjby5F?=
Guest
Posts: n/a
 
      18th Feb 2007
I have a user form where cell A1 is a input field for "WeekNo., No of days,
or Date. The date is selected by use of the build in calandar.
The range A2-A12 are referenced to A1+1, A1+2 etc.
This works fine, as long the Date is not used, because the Calendar will
convert the formatting of the cell to the "date" format.
The formula: & Text(today(),"mm/dd/yy") cannot be used as this format the
Cell to text, not allowing the range A2-A12 to be updated when the date is
selected.

Your help or guidance is appriciated.
thanks.
Paco.E
 
Reply With Quote
 
 
 
 
merjet
Guest
Posts: n/a
 
      18th Feb 2007
I didn't understand your remark about WeekNo., No of days. With A2 =
A1+1 etc. A2:A12 work fine for me, except they show serial dates. They
are easily switched to date format, e.g.:
Private Sub Calendar1_Click()
Sheets("Sheet1").Range("A1") = Calendar1.Value
Sheets("Sheet1").Range("A2:A12").NumberFormat = "m/d/yyyy"
End Sub

If this doesn't work for WeekNo. or No of days, you can change the
format of A2:A12 in a similar way.

Hth,
Merjet


 
Reply With Quote
 
=?Utf-8?B?UGFjby5F?=
Guest
Posts: n/a
 
      22nd Feb 2007
Hi Merjet,
Thks, sorry for the slow reply, but was tight up in Lunar NY celebrations
"Con chi fa Chai"

Yes, my question is confusing.
Here again,

How do I reset cell A1 format after the use of the calandar, which format
the cell A1 to Date (e.g dd/mm/yy)
So the next case cell A1 is used for number format
(as needed for No.of days; e.g. "3"),
The cell still indicate a date format e.g. 03/01/00 instead of the number 3
How do i reset the date back to numeric??

Thnks



"merjet" wrote:

> I didn't understand your remark about WeekNo., No of days. With A2 =
> A1+1 etc. A2:A12 work fine for me, except they show serial dates. They
> are easily switched to date format, e.g.:
> Private Sub Calendar1_Click()
> Sheets("Sheet1").Range("A1") = Calendar1.Value
> Sheets("Sheet1").Range("A2:A12").NumberFormat = "m/d/yyyy"
> End Sub
>
> If this doesn't work for WeekNo. or No of days, you can change the
> format of A2:A12 in a similar way.
>
> Hth,
> Merjet
>
>
>

 
Reply With Quote
 
merjet
Guest
Posts: n/a
 
      22nd Feb 2007
Range("A1").NumberFormat = "0"

Hth,
Merjet


 
Reply With Quote
 
=?Utf-8?B?UGFjby5F?=
Guest
Posts: n/a
 
      23rd Feb 2007
thanks
Paco.E

"merjet" wrote:

> Range("A1").NumberFormat = "0"
>
> Hth,
> Merjet
>
>
>

 
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
Conditional Formatting based on data in adjacent cell & restrict save without required data bjohnson Microsoft Excel Programming 1 28th Aug 2007 10:27 PM
Need Help, DataGrid, Cell color change on cell data change =?Utf-8?B?QnJpYW5ESA==?= Microsoft C# .NET 0 13th Jun 2007 03:45 PM
Re: Excel bar chart formatting of bars to change colors as data change Jon Peltier Microsoft Excel Misc 0 24th Jan 2007 06:07 PM
Change Formatting In 'Active' Cell =?Utf-8?B?SkIyMDEw?= Microsoft Excel Misc 4 2nd Feb 2006 05:58 PM
Re: Change cell formatting based on value? Dave Peterson Microsoft Excel Discussion 0 5th Sep 2005 01:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:08 PM.