# Excel: IF(ISNA) / Else calculation statement

Hello,

I would like to run a IF(ISNA) statement, however if there is no '#N/A' found, then run a calculation. Is this possible?

My current formula is (line breaks for ease of reading)

=IF(ISNA(I2-(INDEX('Sent Emails'!I:I,MATCH('3 Month Letter'!A2,'Sent Emails'!A:A,0)))),1,
(INDEX('Sent Emails'!I:I,MATCH('3 Month Letter'!A2,'Sent Emails'!A:A,0))))>240,1,2))

Currently, this returns 'false' if there's no #N/A. Instead I would like Excel to calculate the second line of my formula.

Thanks
LVL 1
###### Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Director, Practice Manager and Computing ConsultantCommented:
I think you are missing an IF at the start of the second line. Otherwise, what you have got would not make sense.

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Finance AnalystCommented:
You are getting FALSE because it is calculating the second part of the Formula but you are missing an IF.

The second part of the formula is looking at INDEX(.....) and comparing to 240 but currently all its doing is "Index calc'd Value" > 240  TRUE or FALSE. I believe it should be:

=IF(ISNA(I2-(INDEX('Sent Emails'!I:I,MATCH('3 Month Letter'!A2,'Sent Emails'!A:A,0)))),1,
IF((INDEX('Sent Emails'!I:I,MATCH('3 Month Letter'!A2,'Sent Emails'!A:A,0))))>240,1,2)))

Thanks
Rob H
Author Commented:
Thanks. I split the points. Final formula was:

=IF(ISNA(I2-(INDEX('Sent Emails'!I:I,MATCH('3 Month Letter'!A2,'Sent Emails'!A:A,0)))),1,IF((INDEX('Sent Emails'!I:I,MATCH('3 Month Letter'!A2,'Sent Emails'!A:A,0)))>240,1,2))
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.