# THE FUNCTION @DATEVALUE

#### navyaa

##### Board Regular
I am converting a sheet to excel and have this combination of functions in a cell that I am trying to translate to excel but I am having trouble understanding how the datevalue and a few other functions work in this:

+BT10*((BZ10*(@MONTH(\$DATE2)=@MONTH(BW10))*(@YEAR(\$DATE2)=@YEAR(BW10)))+(@IF(@ISERR(@DATEVALUE(ERR))=1,@DAY(\$DATE2),@DATEVALUE(\$DATE2)-@DATEVALUE(ERR))*((@MONTH(\$DATE2)<>@MONTH(BW10))#OR#(@YEAR(\$DATE2)<>@YEAR(BW10)))))*10*(@DATEVALUE(BW10)<=@DATEVALUE(\$DATE2))

Any suggestions??
Would be very appreciated!!!

NAVYA.

### Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

#### COLH99

##### New Member
Hi Navyaa

@datevalue returns the serial number of a date
@DATEVALUE("21-Feb-91") returns the date number 33290.
@DATEVALUE(BIRTHDAY) returns the date number 20723, if the cell named BIRTHDAY contains the label 25-Sep-56.

#### navyaa

##### Board Regular

I had one other question...Would you be knowing how to do this in excel? I mean if i have a date like 12/05/2002, how would i generate a serial number from it?

Thank you,
Navya.

#### COLH99

##### New Member
Hi navyaa

Excel 97 also uses =DATEVALUE(text)

#### COLH99

##### New Member

Hi navyaa

Excel 97 also uses =DATEVALUE(text)

#### navyaa

##### Board Regular
Thank you for your reply ...but when i tried using it in excel it gives me a value error....

This might be because I am trying to convert a date...i have 12/12/2002 in a cell and I am trying to get the serial value for that.

Thank you,
navya

#### COLH99

##### New Member
The date is a serial number it's just the format that makes it look like a date. If you have a mix of dates as text and numbers then you will need IF(ISERROR(DATEVALUE(yourdate)),yourdate,DATEVALUE(yourdate))

Replies
8
Views
290
Replies
3
Views
99
Replies
14
Views
341
Replies
12
Views
548
Replies
7
Views
233

1,127,197
Messages
5,623,310
Members
415,966
Latest member
ctorohuamanchumo

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back