+ Reply to Thread
Results 1 to 8 of 8

Formula to lookup data with IF function

  1. #1
    Registered User
    Join Date
    10-29-2017
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    62

    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!
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,777

    Re: Formula to lookup data with IF function

    Try this:

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


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    10-29-2017
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    62

    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. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,777

    Re: Formula to lookup data with IF function

    This:

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

  5. #5
    Registered User
    Join Date
    10-29-2017
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    62

    Re: Formula to lookup data with IF function

    Having the attached error.
    Attached Images Attached Images

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,777

    Re: Formula to lookup data with IF function

    Sorry - missing bit!


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

  7. #7
    Registered User
    Join Date
    10-29-2017
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    62

    Re: Formula to lookup data with IF function

    Thanks Aligw! Now is perfect

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,777

    Re: Formula to lookup data with IF function

    No worries!

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Using Lookup Function Formula in VBA
    By BBFDSue in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-10-2017, 11:53 PM
  2. Formula/Function to lookup and display value
    By pingman3 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-06-2015, 01:08 PM
  3. Help with a lookup function within a formula?
    By Janbi in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-23-2015, 04:38 PM
  4. Replies: 4
    Last Post: 10-15-2014, 12:38 AM
  5. Create a lookup formula with an If or Lookup function
    By afountas21 in forum Excel General
    Replies: 2
    Last Post: 09-05-2012, 06:53 PM
  6. try to find formula for Lookup Function
    By sighlent1 in forum Excel General
    Replies: 2
    Last Post: 07-21-2011, 04:51 PM
  7. Using Lookup function in a larger formula
    By rgold in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 11-10-2008, 03:08 PM

Bookmarks

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