ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   insert data based on time (https://www.excelbanter.com/excel-discussion-misc-queries/137376-insert-data-based-time.html)

BrianMcC

insert data based on time
 
I want to auto insert data based on date so that if A5 = Today then AF10 is
updated and the next day if A11=Today then AF11 is updated...... Using
formula in cell =IF(AF5=TODAY(),($B$10),"") but of course that doesn't work
because you have to go and delete the formula to make it static ---- any
suggestions please. Do I need a macro or is there someway of auto locking the
data once it has been updated.

Malcolm Harper

insert data based on time
 


"BrianMcC" wrote:

I want to auto insert data based on date so that if A5 = Today then AF10 is
updated and the next day if A11=Today then AF11 is updated...... Using
formula in cell =IF(AF5=TODAY(),($B$10),"") but of course that doesn't work
because you have to go and delete the formula to make it static ---- any
suggestions please. Do I need a macro or is there someway of auto locking the
data once it has been updated.


If I understand your question correctly, all you need to do is to change
your equality test into a less than or equal test:
=IF(A1<=TODAY(),"Today or earlier","Not there yet")
will read "Today or earlier" if the date in A1 has been reached or passed,
but "Not there yet" if the date is in the future.
If you need different actions depending on past, present, or future you can
nest IF()s:
=IF(A1<=TODAY(),IF(A1<TODAY(),"Been there","Right now"),"Not there yet")


BrianMcC

insert data based on time
 


"Malcolm Harper" wrote:

Its always the simple idea that you can't see. I missed that one. Many thanks for your help. Thats it sorted I think.

"BrianMcC" wrote:

I want to auto insert data based on date so that if A5 = Today then AF10 is
updated and the next day if A11=Today then AF11 is updated...... Using
formula in cell =IF(AF5=TODAY(),($B$10),"") but of course that doesn't work
because you have to go and delete the formula to make it static ---- any
suggestions please. Do I need a macro or is there someway of auto locking the
data once it has been updated.


If I understand your question correctly, all you need to do is to change
your equality test into a less than or equal test:
=IF(A1<=TODAY(),"Today or earlier","Not there yet")
will read "Today or earlier" if the date in A1 has been reached or passed,
but "Not there yet" if the date is in the future.
If you need different actions depending on past, present, or future you can
nest IF()s:
=IF(A1<=TODAY(),IF(A1<TODAY(),"Been there","Right now"),"Not there yet")



All times are GMT +1. The time now is 06:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com