Solved Using if then function

August 31, 2015 at 20:28:08
Specs: Windows 8.1
Need a formula to check whether todays date is before the 20th and if so need it to calculate a number in another cell times 1.75%.
something like if the date is before the 20th then times number in cell C12 times 0.0175

message edited by treok


See More: Using if then function

Report •


✔ Best Answer
September 1, 2015 at 07:57:57
Try this and see how it works:

=IF(DAY(TODAY())<20,C12*0.0175,"")

MIKE

http://www.skeptic.com/

message edited by mmcconaghy



#1
September 1, 2015 at 03:50:52
Thanks for telling us what you need. If you want some help with that, feel free to ask.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#2
September 1, 2015 at 04:15:39
You'll need the "Then Else" part of your statement. What if the condition (the date is the 20th or later) is false?

Report •

#3
September 1, 2015 at 07:56:01
beachyhbt,

I understand what you are trying to say, but technically there is no "Then Else" involved with an Excel IF function. There are only "value_if_true" and "value_if_false" arguments.

IF(logical_test, value_if_true, [value_if_false])

I only bring this up because VBA does indeed allow for If-Then-Else constructs - using those exact terms - but an Excel IF function does not. Yes, the value_if_true could be considered equivalent to the "Then" and the value_if_false could be considered equivalent to the "Else", but those terms will not appear in any Help files associated with the IF function.

Admittedly, I may be picking a nit here, but I am simply trying to avoid any confusion for a member who may be unfamiliar with the IF function.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

Related Solutions

#4
September 1, 2015 at 07:57:57
✔ Best Answer
Try this and see how it works:

=IF(DAY(TODAY())<20,C12*0.0175,"")

MIKE

http://www.skeptic.com/

message edited by mmcconaghy


Report •

#5
September 1, 2015 at 11:39:37
I guess my understanding of IF statements must be incorrect. I always thought the IF is the value if true, and the "Else" was if the "IF" value was not equal to the criteria (thus, False.)

Just one of those things that is muddled in my head, I guess.

Thanks for the correction.


Report •

#6
September 1, 2015 at 13:01:38
As I tried to say in my post, you were not incorrect, except perhaps in the terminology you chose.

If a person has no idea how to write an IF statement, then using the terms "Then" and "Else" probably won't help. Those terms are not typically associated with an Excel IF function, but they are definitely used in many "programming languages" such as VBA, etc.

I was merely trying to remove any confusion for the OP, but perhaps I have introduce some instead. :-(

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

Ask Question