Help with if statement

R

rew3791

Ok, I can't quite make this formulat work.
Assume: Column D is Birth Year, Column E is Death Year, Column F is Age at
Death

The basic formula is =E-D (Death Year minus birth year gives me age at death
(F))

What I’m trying to do is if the death year column is blank (E), add 100 to
the birth year (D), then use that number as the E in the basic formula.
Similarly, if the birth year column (D) is blank, subtract 100 from the death
year (E) then use that as D in the =E-D formula.

This is the statement I've tried:
=IF(ISBLANK(E3), (E3=D3+100)), IF(ISBLANK(D3), (D3=E3-100)), E3-D3

Those "=" signs don't look right....I think that's part of it.
Help?! Thank you!!!!!
 
T

T. Valko

Try this...

=IF(COUNT(D3:E3)=2,E3-D3,IF(COUNT(D3:E3),IF(D3="",E3-100,IF(E3="",D3+100,"")),""))
 
R

rew3791

I got "True" in each row.


--
Rachel


T. Valko said:
Try this...

=IF(COUNT(D3:E3)=2,E3-D3,IF(COUNT(D3:E3),IF(D3="",E3-100,IF(E3="",D3+100,"")),""))

--
Biff
Microsoft Excel MVP





.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top