Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default EOMONTH() question

i have dates in a column and in the next column im using the formula
=eomonth(a1,1) and instead of getting the last day of the next month I'm
getting a "#value!" error despite being fairly sure the formula is correct.
Any suggestions?

Mike
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 618
Default EOMONTH() question

My guess is that what you think is a date is actually text.
--
David Biddulph

"Mike" wrote in message
...
i have dates in a column and in the next column im using the formula
=eomonth(a1,1) and instead of getting the last day of the next month I'm
getting a "#value!" error despite being fairly sure the formula is
correct.
Any suggestions?

Mike



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default EOMONTH() question

Thanks Dave but the target cell is formatted as a date.

"David Biddulph" wrote:

My guess is that what you think is a date is actually text.
--
David Biddulph

"Mike" wrote in message
...
i have dates in a column and in the next column im using the formula
=eomonth(a1,1) and instead of getting the last day of the next month I'm
getting a "#value!" error despite being fairly sure the formula is
correct.
Any suggestions?

Mike




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default EOMONTH() question

On Sat, 11 Nov 2006 12:02:01 -0800, Mike
wrote:

i have dates in a column and in the next column im using the formula
=eomonth(a1,1) and instead of getting the last day of the next month I'm
getting a "#value!" error despite being fairly sure the formula is correct.
Any suggestions?

Mike



The VALUE error frequently indicates a problem with your *data*.

Could it be that you have imported the date from an HTML or other web source?
If so, it is probably text with a trailing <no break space character.

Try this:

=EOMONTH(SUBSTITUTE(TRIM(A1),CHAR(160),""),1)


--ron
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default EOMONTH() question

Ron,

The suggestion you gave me produced the same error. To be absolutely sure
there is nothing wrong with the dates I deleted Cell A1 contents, formatted
the cell as a date (again) and entered the date "1/11/06" no quotes. Using
the formula =eomonth(a1,1) still returned a #value! error instead of what I
expected 30/12/06.

"Ron Rosenfeld" wrote:

On Sat, 11 Nov 2006 12:02:01 -0800, Mike
wrote:

i have dates in a column and in the next column im using the formula
=eomonth(a1,1) and instead of getting the last day of the next month I'm
getting a "#value!" error despite being fairly sure the formula is correct.
Any suggestions?

Mike



The VALUE error frequently indicates a problem with your *data*.

Could it be that you have imported the date from an HTML or other web source?
If so, it is probably text with a trailing <no break space character.

Try this:

=EOMONTH(SUBSTITUTE(TRIM(A1),CHAR(160),""),1)


--ron



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 618
Default EOMONTH() question

The cell may well be formatted as a date but contain text. What do you see
if you enter, in another cell, =A1+1 ?
--
David Biddulph

"Mike" wrote in message
...
Thanks Dave but the target cell is formatted as a date.

"David Biddulph" wrote:

My guess is that what you think is a date is actually text.
--
David Biddulph

"Mike" wrote in message
...
i have dates in a column and in the next column im using the formula
=eomonth(a1,1) and instead of getting the last day of the next month
I'm
getting a "#value!" error despite being fairly sure the formula is
correct.
Any suggestions?

Mike






  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default EOMONTH() question

On Sat, 11 Nov 2006 12:43:02 -0800, Mike
wrote:

Ron,

The suggestion you gave me produced the same error. To be absolutely sure
there is nothing wrong with the dates I deleted Cell A1 contents, formatted
the cell as a date (again) and entered the date "1/11/06" no quotes. Using
the formula =eomonth(a1,1) still returned a #value! error instead of what I
expected 30/12/06.


I cannot reproduce the problem you report on my system. But I would expect to
get 31/12/06 as a result (which I do).

What are your Language settings?
(I tried English-GB to get the DMY format)

What are the return values for these formulas:

=LEN(A1)

=ISTEXT(A1)

=EOMONTH(DATE(2006,11,1),1)

They should return

5
FALSE
31 DEC 2006 (depending on format)


--ron
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default EOMONTH() question

Sorry Dave missed this reply. using your formula adds 1 day to the date

Mike

"David Biddulph" wrote:

The cell may well be formatted as a date but contain text. What do you see
if you enter, in another cell, =A1+1 ?
--
David Biddulph

"Mike" wrote in message
...
Thanks Dave but the target cell is formatted as a date.

"David Biddulph" wrote:

My guess is that what you think is a date is actually text.
--
David Biddulph

"Mike" wrote in message
...
i have dates in a column and in the next column im using the formula
=eomonth(a1,1) and instead of getting the last day of the next month
I'm
getting a "#value!" error despite being fairly sure the formula is
correct.
Any suggestions?

Mike






  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default EOMONTH() question

Ron,

=len(A1) returns 5
=istext(a1) returns false

I suspect that this confirms that it is in fact a date am I correct?
Thanks for your perseverance.

Mike

"Ron Rosenfeld" wrote:

On Sat, 11 Nov 2006 12:43:02 -0800, Mike
wrote:

Ron,

The suggestion you gave me produced the same error. To be absolutely sure
there is nothing wrong with the dates I deleted Cell A1 contents, formatted
the cell as a date (again) and entered the date "1/11/06" no quotes. Using
the formula =eomonth(a1,1) still returned a #value! error instead of what I
expected 30/12/06.


I cannot reproduce the problem you report on my system. But I would expect to
get 31/12/06 as a result (which I do).

What are your Language settings?
(I tried English-GB to get the DMY format)

What are the return values for these formulas:

=LEN(A1)

=ISTEXT(A1)

=EOMONTH(DATE(2006,11,1),1)

They should return

5
FALSE
31 DEC 2006 (depending on format)


--ron

  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 55
Default EOMONTH() question

pls. chk. analysis tool pack as an addin

"Mike" wrote:

i have dates in a column and in the next column im using the formula
=eomonth(a1,1) and instead of getting the last day of the next month I'm
getting a "#value!" error despite being fairly sure the formula is correct.
Any suggestions?

Mike



  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default EOMONTH() question

Ron, sorry should have read your post correctly. the last one
=EOMONTH(DATE(2006,11,1),1) returns a #value! error

Mike

"Ron Rosenfeld" wrote:

On Sat, 11 Nov 2006 12:43:02 -0800, Mike
wrote:

Ron,

The suggestion you gave me produced the same error. To be absolutely sure
there is nothing wrong with the dates I deleted Cell A1 contents, formatted
the cell as a date (again) and entered the date "1/11/06" no quotes. Using
the formula =eomonth(a1,1) still returned a #value! error instead of what I
expected 30/12/06.


I cannot reproduce the problem you report on my system. But I would expect to
get 31/12/06 as a result (which I do).

What are your Language settings?
(I tried English-GB to get the DMY format)

What are the return values for these formulas:

=LEN(A1)

=ISTEXT(A1)

=EOMONTH(DATE(2006,11,1),1)

They should return

5
FALSE
31 DEC 2006 (depending on format)


--ron

  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default EOMONTH() question

4pinoy,

There is now a very embarrassed silence from here. add-in pack checked and
the function now works as expected. Just 1 point I have just checked
Microsoft help and it says I should get a ?name error if the add-in isn't
checked.

Thanks everone for their help.

Mike

"4pinoy" wrote:

pls. chk. analysis tool pack as an addin

"Mike" wrote:

i have dates in a column and in the next column im using the formula
=eomonth(a1,1) and instead of getting the last day of the next month I'm
getting a "#value!" error despite being fairly sure the formula is correct.
Any suggestions?

Mike

  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,440
Default EOMONTH() question

Do you have your own UDF called EOMONTH?
What happens if you press F5 and fill in EOMONTH ?
What happens if you use the Insert Function Wizard *in an empty cell* to insert EoMonth?

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


"Mike" wrote in message ...
| Ron,
|
| =len(A1) returns 5
| =istext(a1) returns false
|
| I suspect that this confirms that it is in fact a date am I correct?
| Thanks for your perseverance.
|
| Mike
|
| "Ron Rosenfeld" wrote:
|
| On Sat, 11 Nov 2006 12:43:02 -0800, Mike
| wrote:
|
| Ron,
|
| The suggestion you gave me produced the same error. To be absolutely sure
| there is nothing wrong with the dates I deleted Cell A1 contents, formatted
| the cell as a date (again) and entered the date "1/11/06" no quotes. Using
| the formula =eomonth(a1,1) still returned a #value! error instead of what I
| expected 30/12/06.
|
| I cannot reproduce the problem you report on my system. But I would expect to
| get 31/12/06 as a result (which I do).
|
| What are your Language settings?
| (I tried English-GB to get the DMY format)
|
| What are the return values for these formulas:
|
| =LEN(A1)
|
| =ISTEXT(A1)
|
| =EOMONTH(DATE(2006,11,1),1)
|
| They should return
|
| 5
| FALSE
| 31 DEC 2006 (depending on format)
|
|
| --ron
|


  #14   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 55
Default EOMONTH() question

it just happen to have the same problem before....

"Mike" wrote:

4pinoy,

There is now a very embarrassed silence from here. add-in pack checked and
the function now works as expected. Just 1 point I have just checked
Microsoft help and it says I should get a ?name error if the add-in isn't
checked.

Thanks everone for their help.

Mike

"4pinoy" wrote:

pls. chk. analysis tool pack as an addin

"Mike" wrote:

i have dates in a column and in the next column im using the formula
=eomonth(a1,1) and instead of getting the last day of the next month I'm
getting a "#value!" error despite being fairly sure the formula is correct.
Any suggestions?

Mike

  #15   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default EOMONTH() question

On Sat, 11 Nov 2006 13:12:01 -0800, Mike
wrote:

Ron, sorry should have read your post correctly. the last one
=EOMONTH(DATE(2006,11,1),1) returns a #value! error

Mike


That being the case, it is likely that you are not calling the Analysis ToolPak
EOMONTH function, but perhaps some other function with the same name.

Ordinarily, if the ATP is not installed, you would get the #NAME error. But if
you had another UDF with the same name, you might be getting a VALUE error.

Check if the Analysis Tool Pak is installed.
--ron
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
Possibly a loaded question, but I think mileslit Excel Discussion (Misc queries) 1 September 10th 05 01:18 AM
How do I find and replace a question mark in Excel? Ranpalandil Excel Discussion (Misc queries) 1 September 7th 05 10:20 PM
Newbie With A Question Michael Excel Worksheet Functions 0 July 28th 05 11:50 PM
Anybody Help with previous question Anthony Excel Discussion (Misc queries) 1 July 26th 05 01:26 PM
Hints And Tips For New Posters In The Excel Newsgroups Gary Brown Excel Worksheet Functions 0 April 15th 05 05:47 PM


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

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

About Us

"It's about Microsoft Excel"