SOLVED

Datevalue+timevalue returns "the cell currently being evaluated contains a constant"

%3CLINGO-SUB%20id%3D%22lingo-sub-184129%22%20slang%3D%22en-US%22%3EDatevalue%2Btimevalue%20returns%20%22the%20cell%20currently%20being%20evaluated%20contains%20a%20constant%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-184129%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22datevalue%2Btimevalue.PNG%22%20style%3D%22width%3A%20394px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F32512i15E07544753E5FD2%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22datevalue%2Btimevalue.PNG%22%20alt%3D%22datevalue%2Btimevalue.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EHello%20guys%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20like%20to%20receive%20some%20help%20from%20you%2C%20as%20i%20cannot%20understand%20why%20my%20formula%20works%20for%20some%20values%20and%20for%20others%20isn't.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%2C%20in%20date1%20column%2C%20i%20have%20a%20formula%20applied%20to%20a%20previous%20column%2C%20which%20deletes%20CHAR160%20from%20the%20previous%20column%20which%20cannot%20be%20seen%20here.%20Next%2C%20i%20copied%20all%20the%20values%20from%20date1%20to%20column%20date2%20as%20values%20in%20order%20to%20apply%20a%20further%20formula%20(although%20its%20the%20same%20result%20if%20i%20apply%20the%20next%20formula%20directly%20to%20the%20date1%20column).%20The%20formula%20in%20date3%20is%20-%20%3DDatevalue%2Btimevalue%20for%20the%20same%20cell%20in%20date2%20column.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnd%20now%20comes%20the%20ugly%20part%20-%20for%20some%20of%20the%20cells%20the%20formula%20works%20perfectly%2C%20for%20others%20it%20returns%20the%20%23value.%20I%20can't%20make%20any%20correlation%20between%20the%20%23value%20ones%20because%20there%20are%20different%20years%2C%20different%20types%20and%20so%20on.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAll%20the%20cells%20are%20formatted%20the%20same%20-%20the%20ones%20for%20which%20the%20formula%20works%20are%20formatted%20the%20same%20as%20the%20ones%20that%20the%20formula%20doesn't%20work%20for.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20sent%20this%20spreadsheet%20to%20someone%20who%20has%20windows7%20and%20the%20formula%20works%20with%20no%20flaws.%20For%20windows10%20and%20excel16%20-%20the%20errors%20happen.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20anyone%20please%20help%20in%20this%20matter%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-184129%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%20Desktop%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20%26amp%3B%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-196228%22%20slang%3D%22en-US%22%3ERe%3A%20Datevalue%2Btimevalue%20returns%20%22the%20cell%20currently%20being%20evaluated%20contains%20a%20constant%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-196228%22%20slang%3D%22en-US%22%3E%3CP%3Ei%20fixed%20the%20formats%2C%20see%20attached%20plz%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-196209%22%20slang%3D%22en-US%22%3ERe%3A%20Datevalue%2Btimevalue%20returns%20%22the%20cell%20currently%20being%20evaluated%20contains%20a%20constant%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-196209%22%20slang%3D%22en-US%22%3E%3CP%3EThat%20doesn't%20make%20sense%20%3CLI-EMOJI%20id%3D%22lia_disappointed-face%22%20title%3D%22%3Adisappointed_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnyway%2C%20even%20in%20your%20dummy%20workbook%2C%20the%20formatting%20is%20not%20the%20same%20-%20you%20have%20for%20the%20first%20two%20values%20showing%20only%20the%20date%2C%20and%20the%20next%20three%20values%20show%20the%20date%20and%20also%20the%20time.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20can%20that%20be%20solved%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-196208%22%20slang%3D%22en-US%22%3ERe%3A%20Datevalue%2Btimevalue%20returns%20%22the%20cell%20currently%20being%20evaluated%20contains%20a%20constant%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-196208%22%20slang%3D%22en-US%22%3E%3CP%3Ein%20my%20machine.%20it%20works.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eplz%20see%20attached.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-189420%22%20slang%3D%22en-US%22%3ERe%3A%20Datevalue%2Btimevalue%20returns%20%22the%20cell%20currently%20being%20evaluated%20contains%20a%20constant%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-189420%22%20slang%3D%22en-US%22%3E%3CP%3EPlease%20see%20attached%20the%20dummy%20workbook.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-187825%22%20slang%3D%22en-US%22%3ERe%3A%20Datevalue%2Btimevalue%20returns%20%22the%20cell%20currently%20being%20evaluated%20contains%20a%20constant%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-187825%22%20slang%3D%22en-US%22%3Eis%20it%20possible%20to%20post%20a%20dummy%20sample%20workbook%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-187767%22%20slang%3D%22en-US%22%3ERe%3A%20Datevalue%2Btimevalue%20returns%20%22the%20cell%20currently%20being%20evaluated%20contains%20a%20constant%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-187767%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20same%20result%20%3CLI-EMOJI%20id%3D%22lia_disappointed-face%22%20title%3D%22%3Adisappointed_face%3A%22%3E%3C%2FLI-EMOJI%3E%20%23Value%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-187747%22%20slang%3D%22en-US%22%3ERe%3A%20Datevalue%2Btimevalue%20returns%20%22the%20cell%20currently%20being%20evaluated%20contains%20a%20constant%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-187747%22%20slang%3D%22en-US%22%3E%3CP%3Ethen%20you%20should%20try%20this%20formula%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DIFERROR(DATEVALUE(A2)%2BTIMEVALUE(A2)%2CTEXT(A2%2C%22General%22)%2B0)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eplz%20see%20it%20in%20attached%20file.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-187744%22%20slang%3D%22en-US%22%3ERe%3A%20Datevalue%2Btimevalue%20returns%20%22the%20cell%20currently%20being%20evaluated%20contains%20a%20constant%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-187744%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Formula.PNG%22%20style%3D%22width%3A%20281px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F33104i1AF7B8022BF531F7%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Formula.PNG%22%20alt%3D%22Formula.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EUnfortunately%20this%20is%20not%20working.%20I%20have%20added%20the%20%22%2B0%22%20to%20the%20I2%20column%20and%20it%20returns%20%22%23Value%22.%20If%20i%20add%20the%20%22%2B0%22%20to%20the%20I3%2C%20I4%2C%20I5%20it%20is%20working%20and%20again%2C%20if%20i%20add%20it%20to%20the%20I6%20-%20not%20working%20again.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20other%20thoughts%20on%20this%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-186416%22%20slang%3D%22en-US%22%3ERe%3A%20Datevalue%2Btimevalue%20returns%20%22the%20cell%20currently%20being%20evaluated%20contains%20a%20constant%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-186416%22%20slang%3D%22en-US%22%3E%3CP%3Ethis%20issue%20is%20caused%20that%20whenever%20value%20is%20returned%20by%20formula%3CBR%20%2F%3E%3CBR%20%2F%3E%3DIFERROR(DATEVALUE(A3)%2BTIMEVALUE(A3)%2CTEXT(A3%2C%22General%22))%20excel%20still%20detects%20that%20as%20text%3CBR%20%2F%3E%3CBR%20%2F%3Eso%20fix%20this%3CBR%20%2F%3Ejust%20put%20%2B0%20at%20the%20end%20of%20the%20formula%3CBR%20%2F%3E%3CBR%20%2F%3Elike%20this%20%3DIFERROR(DATEVALUE(A3)%2BTIMEVALUE(A3)%2CTEXT(A3%2C%22General%22))%2B0%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-184642%22%20slang%3D%22en-US%22%3ERe%3A%20Datevalue%2Btimevalue%20returns%20%22the%20cell%20currently%20being%20evaluated%20contains%20a%20constant%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-184642%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22different%20formats.PNG%22%20style%3D%22width%3A%20267px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F32581i7AC1BCCD79F82D77%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22different%20formats.PNG%22%20alt%3D%22different%20formats.PNG%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22dropdown.PNG%22%20style%3D%22width%3A%20267px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F32582i91ACE8DC8401E869%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22dropdown.PNG%22%20alt%3D%22dropdown.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EThank%20you%20very%20much%20for%20solving%20this%20one.%20I%20really%20appreciate%20it.%20I%20have%20used%20the%20%22%3B%22%20separator%20and%20now%20the%20formula%20works%20for%20those%20that%20were%20showing%20the%20%23value%20error.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%20-%20a%20new%20%22issue%22%20occurs%20-%20as%20i%20have%20attached%20the%20photos%2C%20although%20all%20the%20cells%20are%20formatted%20with%20the%20same%20date%20type%2C%20as%20you%20can%20see%20it%20shows%20different%20formats%20for%20my%20dates.%20Therefore%2C%20when%20i%20hit%20the%20dropdown%20list%20in%20order%20to%20filter%20by%20months%2Fyears%20whatever%2C%20it%20shows%20the%20years%2C%20if%20i%20expand%20the%20years%20it%20shows%20the%20months%20but%20unfortunately%20the%20ones%20that%20previously%20had%20%23value%2C%20are%20not%20included%20in%20the%20years%2Fmonths%2C%20and%20are%20shown%20separately%20after%20the%20years.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDo%20you%20have%20any%20idea%20how%20i%20can%20solve%20this%20one%20as%20well%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOnce%20again%2C%20thank%20you%20so%20very%20much%20for%20your%20help!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-184254%22%20slang%3D%22en-US%22%3ERe%3A%20Datevalue%2Btimevalue%20returns%20%22the%20cell%20currently%20being%20evaluated%20contains%20a%20constant%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-184254%22%20slang%3D%22en-US%22%3E%3CP%3Eyou%20made%20a%20mistake%20in%20the%20function%20argument%20separators.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eafter%20TEXT(H2%20you%20used%20%3B%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ein%20some%20machines%20the%20functions%20argument%20separators%20is%20either%20comma%20or%26nbsp%3Bsemicolon.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eso%20part%20of%20your%20formula%20uses%20comma%20and%20part%20of%20it%20semicolon%20which%20is%20not%20correct.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eyou%20can%20use%20only%20one%20type%20of%20separator%20depending%20on%20the%20regional%20language%20setting%20of%20your%20machine.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eplease%20see%20attached%20file%20that%20demonstrates%20that%20formula%20is%20working.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-184238%22%20slang%3D%22en-US%22%3ERe%3A%20Datevalue%2Btimevalue%20returns%20%22the%20cell%20currently%20being%20evaluated%20contains%20a%20constant%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-184238%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22datevalue.PNG%22%20style%3D%22width%3A%20406px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F32533iBA939C95FBDEA8C4%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22datevalue.PNG%22%20alt%3D%22datevalue.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3ENot%20working%20%3CLI-EMOJI%20id%3D%22lia_disappointed-face%22%20title%3D%22%3Adisappointed_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-184164%22%20slang%3D%22en-US%22%3ERe%3A%20Datevalue%2Btimevalue%20returns%20%22the%20cell%20currently%20being%20evaluated%20contains%20a%20constant%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-184164%22%20slang%3D%22en-US%22%3E%3CP%3Ecan%20you%20try%20with%20this%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DIFERROR(DATEVALUE(B2)%2BTIMEVALUE(B2)%2CTEXT(B2%2C%22General%22))%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

datevalue+timevalue.PNG

Hello guys,

 

I would like to receive some help from you, as i cannot understand why my formula works for some values and for others isn't.

 

So, in date1 column, i have a formula applied to a previous column, which deletes CHAR160 from the previous column which cannot be seen here. Next, i copied all the values from date1 to column date2 as values in order to apply a further formula (although its the same result if i apply the next formula directly to the date1 column). The formula in date3 is - =Datevalue+timevalue for the same cell in date2 column. 

 

And now comes the ugly part - for some of the cells the formula works perfectly, for others it returns the #value. I can't make any correlation between the #value ones because there are different years, different types and so on. 

 

All the cells are formatted the same - the ones for which the formula works are formatted the same as the ones that the formula doesn't work for.

 

I've sent this spreadsheet to someone who has windows7 and the formula works with no flaws. For windows10 and excel16 - the errors happen.

 

Can anyone please help in this matter?

 

Thank you!

13 Replies

can you try with this

 

=IFERROR(DATEVALUE(B2)+TIMEVALUE(B2),TEXT(B2,"General"))

best response confirmed by Draghici Sorin (Occasional Contributor)
Solution

you made a mistake in the function argument separators.

 

after TEXT(H2 you used ; 

 

in some machines the functions argument separators is either comma or semicolon.

 

so part of your formula uses comma and part of it semicolon which is not correct.

 

you can use only one type of separator depending on the regional language setting of your machine.

 

please see attached file that demonstrates that formula is working.

 

 

 

different formats.PNGdropdown.PNG

Thank you very much for solving this one. I really appreciate it. I have used the ";" separator and now the formula works for those that were showing the #value error.

 

Now - a new "issue" occurs - as i have attached the photos, although all the cells are formatted with the same date type, as you can see it shows different formats for my dates. Therefore, when i hit the dropdown list in order to filter by months/years whatever, it shows the years, if i expand the years it shows the months but unfortunately the ones that previously had #value, are not included in the years/months, and are shown separately after the years.

 

Do you have any idea how i can solve this one as well?

 

Once again, thank you so very much for your help!

this issue is caused that whenever value is returned by formula

=IFERROR(DATEVALUE(A3)+TIMEVALUE(A3),TEXT(A3,"General")) excel still detects that as text

so fix this
just put +0 at the end of the formula

like this =IFERROR(DATEVALUE(A3)+TIMEVALUE(A3),TEXT(A3,"General"))+0

Formula.PNG

Unfortunately this is not working. I have added the "+0" to the I2 column and it returns "#Value". If i add the "+0" to the I3, I4, I5 it is working and again, if i add it to the I6 - not working again.

 

Any other thoughts on this?

then you should try this formula

 

=IFERROR(DATEVALUE(A2)+TIMEVALUE(A2),TEXT(A2,"General")+0)

 

plz see it in attached file.

is it possible to post a dummy sample workbook?

Please see attached the dummy workbook.

in my machine. it works.

 

plz see attached.

That doesn't make sense :(

 

Anyway, even in your dummy workbook, the formatting is not the same - you have for the first two values showing only the date, and the next three values show the date and also the time.

 

How can that be solved?

i fixed the formats, see attached plz