Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 77
Default Date Format - Formula Problem

I setup a spreadsheet to automatically fill in a calendar for our company
fiscal year.

All the calculations run off the date entered into B2. The cell is formated
to show the date in "mmm" format. Cell B3 = B2, but is formated as "d".
Then cell C2 and C3 are the next day, and so on.

When I enter a date into B2, it shows the correct abbreviation, but then all
the formulas return a #VALUE! error and cell B2 changes from the date to the
actual abbreviation that it is formated for.

For example, I enter 1/1/2007 and hit enter. The cell now reads "JAN" in
both the cell and the formula bar (where it should still read 1/1/2007).
Which then throws off all the other formulas.

Any ideas how to fix this?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,726
Default Date Format - Formula Problem

Sounds like you have some event code changing. Right-click the sheet tab
name and select code, check if there is code there.

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"Josh O." wrote in message
...
I setup a spreadsheet to automatically fill in a calendar for our company
fiscal year.

All the calculations run off the date entered into B2. The cell is
formated
to show the date in "mmm" format. Cell B3 = B2, but is formated as "d".
Then cell C2 and C3 are the next day, and so on.

When I enter a date into B2, it shows the correct abbreviation, but then
all
the formulas return a #VALUE! error and cell B2 changes from the date to
the
actual abbreviation that it is formated for.

For example, I enter 1/1/2007 and hit enter. The cell now reads "JAN" in
both the cell and the formula bar (where it should still read 1/1/2007).
Which then throws off all the other formulas.

Any ideas how to fix this?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 77
Default Date Format - Formula Problem

Yes there is.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column < 2 Then Exit Sub
Target = UCase(Format(Target, "mmm"))

End Sub

Looks like it is changing the "Jan" to "JAN"...which I do actually want it
to do. Is there a way to do this that doesn't replace the formula, just the
format?

"Bob Phillips" wrote:

Sounds like you have some event code changing. Right-click the sheet tab
name and select code, check if there is code there.

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"Josh O." wrote in message
...
I setup a spreadsheet to automatically fill in a calendar for our company
fiscal year.

All the calculations run off the date entered into B2. The cell is
formated
to show the date in "mmm" format. Cell B3 = B2, but is formated as "d".
Then cell C2 and C3 are the next day, and so on.

When I enter a date into B2, it shows the correct abbreviation, but then
all
the formulas return a #VALUE! error and cell B2 changes from the date to
the
actual abbreviation that it is formated for.

For example, I enter 1/1/2007 and hit enter. The cell now reads "JAN" in
both the cell and the formula bar (where it should still read 1/1/2007).
Which then throws off all the other formulas.

Any ideas how to fix this?




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,726
Default Date Format - Formula Problem

It is not only upshifting it, it is removing the formula. I am afraid there
is no way to keep the formula and upshift. Ditch the code is my advice.

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"Josh O." wrote in message
...
Yes there is.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column < 2 Then Exit Sub
Target = UCase(Format(Target, "mmm"))

End Sub

Looks like it is changing the "Jan" to "JAN"...which I do actually want it
to do. Is there a way to do this that doesn't replace the formula, just
the
format?

"Bob Phillips" wrote:

Sounds like you have some event code changing. Right-click the sheet tab
name and select code, check if there is code there.

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"Josh O." wrote in message
...
I setup a spreadsheet to automatically fill in a calendar for our
company
fiscal year.

All the calculations run off the date entered into B2. The cell is
formated
to show the date in "mmm" format. Cell B3 = B2, but is formated as
"d".
Then cell C2 and C3 are the next day, and so on.

When I enter a date into B2, it shows the correct abbreviation, but
then
all
the formulas return a #VALUE! error and cell B2 changes from the date
to
the
actual abbreviation that it is formated for.

For example, I enter 1/1/2007 and hit enter. The cell now reads "JAN"
in
both the cell and the formula bar (where it should still read
1/1/2007).
Which then throws off all the other formulas.

Any ideas how to fix this?






  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default Date Format - Formula Problem

Get rid of the code first. It looks as though the code is only affecting
column B.

Anyway, with your date in B2, you might try this formula in B3.
=UPPER(TEXT(B2,"mmm"))


HTH,
Paul



"Josh O." wrote in message
...
Yes there is.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column < 2 Then Exit Sub
Target = UCase(Format(Target, "mmm"))

End Sub

Looks like it is changing the "Jan" to "JAN"...which I do actually want it
to do. Is there a way to do this that doesn't replace the formula, just
the
format?

"Bob Phillips" wrote:

Sounds like you have some event code changing. Right-click the sheet tab
name and select code, check if there is code there.

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"Josh O." wrote in message
...
I setup a spreadsheet to automatically fill in a calendar for our
company
fiscal year.

All the calculations run off the date entered into B2. The cell is
formated
to show the date in "mmm" format. Cell B3 = B2, but is formated as
"d".
Then cell C2 and C3 are the next day, and so on.

When I enter a date into B2, it shows the correct abbreviation, but
then
all
the formulas return a #VALUE! error and cell B2 changes from the date
to
the
actual abbreviation that it is formated for.

For example, I enter 1/1/2007 and hit enter. The cell now reads "JAN"
in
both the cell and the formula bar (where it should still read
1/1/2007).
Which then throws off all the other formulas.

Any ideas how to fix this?








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert a month to a quarter ...... Epinn New Users to Excel 26 May 3rd 23 07:45 PM
Excel 2007 Date Format Problem terry Excel Discussion (Misc queries) 0 November 25th 06 06:16 AM
Date format problem Vass Excel Worksheet Functions 7 April 3rd 06 04:50 PM
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
date format within a cell containing a formula Brushie76 Excel Discussion (Misc queries) 1 January 22nd 05 03:50 AM


All times are GMT +1. The time now is 04:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"