# Formula to lookup data with IF function

1. ## Formula to lookup data with IF function

Hi,
I am trying to populate a date in column C by doing a lookup of column B and do a simple formula (column B's date - 3 working days) [example: column B's date is 6/1, so result should be 5/27), but if column A has a date, it will take column A date.

However, somehow my formula is not working right.

Need expertise advise what is wrong with the formula.

Thanks!

2. ## Re: Formula to lookup data with IF function

Try this:

=IF(A2<>"",A2,WORKDAY.INTL(B2,-3))

3. ## Re: Formula to lookup data with IF function

Thanks, Aligw! It works perfectly now.

One more question:
If column A and B has no date, I want the formula to return with a blank.

I tried this formula but it does not work. Any advise?

=IF(IFNA(N90<>"",N90,WORKDAY.INTL(O90,-3)))

Thanks again.

4. ## Re: Formula to lookup data with IF function

This:

=IF(AND(A2="",B2="","",A2<>"",A2,WORKDAY.INTL(B2,-3)))

5. ## Re: Formula to lookup data with IF function

Having the attached error.

6. ## Re: Formula to lookup data with IF function

Sorry - missing bit!

=IF(AND(A2="",B2=""),"",IF(A2<>"",A2,WORKDAY.INTL(B2,-3)))

7. ## Re: Formula to lookup data with IF function

Thanks Aligw! Now is perfect

8. ## Re: Formula to lookup data with IF function

No worries!

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1