IF function and countdown

bygum

New Member
Joined
Apr 5, 2006
Messages
24
Hello There

In A1 I have initiated a countdown from any number to zero,I created that in VBA.I then created an IF function and placed another value into B1.(the number 2)

When the countdown starts and reaches a certain number I want Cell C1(the function cell) to say "hello"'This happens because both conditions in Cell A1 and and B1 are true.
However when the the countdown continues,C1 just goes back to reading false because cell A1 is no longer true:

=IF(AND(A1=TIME(0,1,20),B1=2),"hello")

My question is this...is there any way I can keep the text in C2 even when the countdown makes the condition false,or put anotherway despite the logic no longer being true the "hello" will remain.
Any help appreciated on this function.
Kind Regards
Bygum
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

iliace

Well-known Member
Joined
Jan 15, 2008
Messages
3,546
Office Version
  1. 365
  2. 2016
  3. 2010
Platform
  1. Windows
Could you make it <= since it is counting down?

=IF(AND(A1<=TIME(0,1,20),B1=2),"hello")
 
Upvote 0

bygum

New Member
Joined
Apr 5, 2006
Messages
24
Hi iliace

Great! Works perfect.Many thanks Ive been scratching my head on that one for quite few hours :)

bygum
 
Last edited:
Upvote 0

Forum statistics

Threads
1,195,958
Messages
6,012,541
Members
441,709
Latest member
diurpaneus

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Top