#### anna82marie

##### New Member
I'm having an issue trying to get the following formula to return N/A instead of #VALUE!

=IF(\$K8>\$F\$5,(TODAY()-\$K8)*(\$O8*0.2739726%),(TODAY()-\$F\$5)*(\$O8*0.2739726%))

Can anyone help me to do this? I can't get my head around it at all and have a deadline looming. Any help would be really appreciated!!

#### Joe4

Welcome to the Board!

Which version of Excel do you have?
If you have 2007 or newer, you can use IFERROR, i.e.
=IFERROR(IF(\$K8 > \$F\$5,(TODAY()-\$K8)*(\$O8*0.2739726%),(TODAY()-\$F\$5)*(\$O8*0.2739726%)),"N/A")

#### anna82marie

##### New Member
It's 2007, so I will give your formula a try! Thank you

#### Joe4

The IFERROR formula was a nice addition to Excel. Basically, it just tells it what to return in the event of an error. If there is no error, just return the result of the formula (see here for structure: IFERROR function - Excel - Office.com).

In earlier versions, you would have to use IF and ISERROR in conjunction, and have to repeat your formula twice (once to check for the error, and once to return the value if there is no error). Much longer, clunkier, messier.

1,081,530
Messages
5,359,347
Members
400,524
Latest member
Excelbat

### This Week's Hot Topics

• VBA (Userform)
Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
• List box that changes fill color
Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
• Remove duplicates and retain one. Cross-linked cases
Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
• VBA Copy and Paste With Duplicates
Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
• Macro
is it possible for a macro to run if the active cell value is different to the value above it
• IF DATE and TIME
I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...