View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Fred Smith Fred Smith is offline
external usenet poster
 
Posts: 623
Default IF statements with Dates

If seems to me you need to copy the data, rather than use an If statement. Why
not copy the data to the appropriate row where you are trying to store it?

--
Regards,
Fred


"Excel_Headache" wrote in message
...
I'm trying to make a stock worksheet that gives me my stock data with a MS
Money web query. That works fine, what isn't working is, I have a worksheet
called "Daily stocks" with dates starting in A3 and starts with today's date
(today's date because I can't get my IF statement to work) and ends in 2009.
I also have my stocks starting in B1 and ending in P1.

Now to the problem

On my daily stocks sheet I want the stocks to post automatically in on the
date given and that works great. The stocks show up fine. The problem is,
when the date changes to the next day, (say, April 27th) the stock quots in
April 26 go blank or display's a 0. How can I make it so when the date
changes the cells are left alone in the previous date cells?


This is my formula:

=IF(TODAY()=$A3,'Dons Stock'!$G$8,"")

I want to copy that formula (or one that works) into all the cells down to
2009. But I want the previous date stocks to be left alone when the date
changes to today, and the new stocks inserted for that day in that date. Any
ideas would be grateful.

Thanks.