# 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

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

#### 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))

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,164,661
Messages
5,838,651
Members
430,560
Latest member
DaliaKenawy86

### 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