Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 143
Default Why Not in a Single Cell

If I enter:
5/28/2012 in A1
and
02:15:45 in A2
then =A1 + A2 works just fine, but if I enter:
=5/28/2012 + 02:15:45 in a cell I get an error.

Why?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,514
Default Why Not in a Single Cell

James Ravenswood explained on 5/28/2012 :
If I enter:
5/28/2012 in A1
and
02:15:45 in A2
then =A1 + A2 works just fine, but if I enter:
=5/28/2012 + 02:15:45 in a cell I get an error.

Why?


Perhaps because you're entering as a formula which Excel can't
evaluate!

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,045
Default Why Not in a Single Cell

On Mon, 28 May 2012 16:38:33 -0700 (PDT), James Ravenswood wrote:

If I enter:
5/28/2012 in A1
and
02:15:45 in A2
then =A1 + A2 works just fine, but if I enter:
=5/28/2012 + 02:15:45 in a cell I get an error.

Why?


Because Excel does not interpret your two different types of data entry as being the same.

Entering =5/28/2012 into a cell is different than entering 5/28/2012 into a cell

The latter is interpreted as a date. The former is interpreted 0.0000887531951150241 (5 divided by 28 divided by 2012)

Similarly, entering 2:15:45 into a single cell is interpreted as a time.
Entering =2:15:45 into a cell is interpreted as an illegal range reference.

Try: ="5/28/2012" + "02:15:45"

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 829
Default Why Not in a Single Cell

"James Ravenswood" wrote:
If I enter:
5/28/2012 in A1
and
02:15:45 in A2
then =A1 + A2 works just fine, but if I enter:
=5/28/2012 + 02:15:45 in a cell I get an error.


If you want to enter date and time in one cell, simply write:

5/28/2012 02:15:45

No equal sign; not plus operator. Those are elements of formulas, not
constants.

But if want to know how to write a constant formula of that form (not
recommended), write:

="5/28/2012" + "02:15:45"

It is not recommended because 5/28/2012 might be interpreted as m/d/yyyy or
d/m/yyyy, depending on the regional date form.

In this case, if the regional date form is d/m/yyyy, you would get an error.
But an ambiguous date like "1/2/2012" (intended to mean Jan 2) might simply
be misinterpreted as Feb 1.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 143
Default Why Not in a Single Cell

On Monday, May 28, 2012 7:38:33 PM UTC-4, James Ravenswood wrote:
If I enter:
5/28/2012 in A1
and
02:15:45 in A2
then =A1 + A2 works just fine, but if I enter:
=5/28/2012 + 02:15:45 in a cell I get an error.

Why?


Thanks to all of you!
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
consolidate data (i.e. a single cell) from multiple spreadsheets intoa single sheet James Sheriff Excel Programming 4 August 4th 10 05:35 PM
Very Basic Problem - Merged Cell Equals Contents of a Single Cell jollynicechap Excel Worksheet Functions 3 December 29th 06 08:16 PM
From single cell variables to a single column serie noyau New Users to Excel 1 December 22nd 06 06:43 AM
Transfer single cell information to specific cell based on user criteria RoVo Excel Programming 0 May 31st 06 04:20 PM
is there a way to add single digits within a single cell? ceci Excel Worksheet Functions 3 August 18th 05 08:58 PM


All times are GMT +1. The time now is 02:47 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"