real number

K

kontraa

please help...

i need to control if a value in a cell is real number greater then 0.
The problem is that excel threads date as a number too...thanx
 
R

robert111

'RIGHT(TEXT(D21,"dd mmm yyyy"),4)

if your date is in d21 this will return the text number 2006, say...

you could then apply an IF statement to this
 
R

Ron Rosenfeld

please help...

i need to control if a value in a cell is real number greater then 0.
The problem is that excel threads date as a number too...thanx

Since Excel stores dates as serial numbers, one way of determining if the cell
contains a date is to see if the cell is formatted as a date.

e.g:

=LEFT(CELL("format",A1),1)="D"

will be TRUE if the cell is formatted as a date.

So maybe something like:

=AND(LEFT(CELL("format",A1),1)<>"D",COUNTIF(A1,">0"))


--ron
 
Top