+ Reply to Thread
Results 1 to 3 of 3

IF cell contains value from a list then...

  1. #1
    Registered User
    Join Date
    09-24-2012
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    5

    IF cell contains value from a list then...

    Hi,

    I have the following formula which adds a year onto a date in cell B2. However, I now need to alter the formula to account for certain departments having an extension of 18 months.

    I need the formula to say ‘If cell B2 contains a value from Column H then add 18 months, else add 12 months. My research had pointed me to use ISNUMBER(SEARCH) to see if a cell contains a value but it’s not working and having used Evaluate formula to step through it – I’m not convinced I’m using the right function.

    Would really appreciate a steer in the right direction.

    Formula I’ve tried:

    =IF(ISNUMBER(SEARCH(A2,H:H)),DATE(YEAR(B2),MONTH(B2)+18,DAY(B2)),DATE(YEAR(B2)+1,MONTH(B2),DAY(B2)))

    Thanks,
    Extension.PNG

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: IF cell contains value from a list then...

    If cell B2 contains a value from Column H
    Assuming that you meant A2 (not B2), try this in C2:

    =EDATE(B2,IF(COUNTIF(H:H,A2),18,12))

    Also, update your profile to show the current version of Excel that you are using. That screenshot is not of Excel 2003.
    Last edited by 63falcondude; 10-19-2018 at 11:58 AM. Reason: Clarification

  3. #3
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: IF cell contains value from a list then...

    How about:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I see 63falcondude was faster and smarter
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

+ 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. Replies: 3
    Last Post: 11-13-2015, 05:10 AM
  2. [SOLVED] Looper File That opens files from a list to paste values from a cell in a list
    By amartin575 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-22-2014, 10:49 AM
  3. Replies: 2
    Last Post: 03-16-2014, 10:04 AM
  4. Replies: 1
    Last Post: 04-19-2013, 02:25 AM
  5. Data Validation List - Dependent on Adjacent Cell - Value from Unsorted List
    By justforthis1 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-26-2013, 12:24 PM
  6. Auto add a list cell if the last list cell is filled
    By tasuooooo in forum Excel General
    Replies: 0
    Last Post: 07-19-2012, 03:33 AM
  7. Replies: 1
    Last Post: 05-17-2011, 08:44 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