View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default if date statement or formula

Dates are just numbers to excel.

Can you just check to see if that cell in column A is numeric?

=if(isnumber(a1),1,0)
or
=--isnumber(a1)

(The -- converts true/false to 1/0's.)

If you have other numbers in that column, maybe:

=IF(AND(ISNUMBER(a1),LEFT(CELL("format",a1),1)="D" ),1,0)
or
=--AND(ISNUMBER(A1),LEFT(CELL("format",A1),1)="D")
or even
=ISNUMBER(A1)*(LEFT(CELL("format",A1),1)="D")
(multiplying is enough to do that conversion)

novice33 wrote:

I am trying to create an If statement that would populate a 1 in another cell
by reading the date in the cell next to it. For example, in cell A2 I have
12/12/2005, I want cell B2 to populate with a 1 if there is a date. More or
less, every time a date is entered in Column A, I want Column B to have a 1
next to it. I would appreciate any help given.


--

Dave Peterson