+ Reply to Thread
Results 1 to 5 of 5

Help: Formula - Populate Field /w Conditions

  1. #1
    Registered User
    Join Date
    08-30-2016
    Location
    Edmonton, Canada
    MS-Off Ver
    2016 64b
    Posts
    92

    Help: Formula - Populate Field /w Conditions

    Hello,

    I'm looking to populate a field (yellow in file). I need help to determine how to do this. I think vlookup with an if statement is one approach, but I'm not quite sure.

    It's difficult to explain what I'm trying to do, so please review the attached file.

    My attempt to explain:

    Vlookup data for a "certain type/condition" and pull back the date. In this case, I want to find the date for each number when the type is not equal to A or Z. All dates are the same for Types that are not equal to A or Z; dates are different between types A and Z.
    Number|| TYPE || DATE
    1...............A.....Jan1, 2016
    1...............B.....Jan3, 2016
    1...............C.....Jan3, 2016
    1...............Z.....Jan2, 2016

    In this case, I would want to pull "Jan 3, 2016" and ignore "1" where Type = A and/or Z.

    - The problem is you're setting a restriction on the Vlookup to 'not' pull a date for the first instance of the number (i.e. 1, A, Jan 1, 2016); you're telling excel to ignore all instances of "a", and find the next instance of 1, where the type is <> A or Z. I don't know how to do that; or maybe vlookup is not the right function to use?

    Help is appreciated!
    Attached Files Attached Files
    Last edited by happydays886; 02-03-2017 at 02:10 PM.

  2. #2
    Registered User
    Join Date
    08-30-2016
    Location
    Edmonton, Canada
    MS-Off Ver
    2016 64b
    Posts
    92

    Re: Help: Formula - Populate Field /w Conditions

    Thanks again in advance.
    Last edited by happydays886; 02-03-2017 at 01:36 PM.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Help: Formula - Populate Field /w Conditions

    Hi,

    One way as an array formula in G5 copied down

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

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Help: Formula - Populate Field /w Conditions

    Here is the other way
    A formula similar to Richards as a regular formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  5. #5
    Registered User
    Join Date
    08-30-2016
    Location
    Edmonton, Canada
    MS-Off Ver
    2016 64b
    Posts
    92

    Re: Help: Formula - Populate Field /w Conditions

    Yeah, that works.

    I went with "=INDEX($B$2:$E$23,MATCH(G5&"0",$B$2:$B$23&$D$2:$D$23,0),4)"

    As this formula bogs excel down; I made an if function to list A/Z = 1, <> = 0 in a new row "d".

    Thank you everyone!

+ 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: 19
    Last Post: 04-12-2017, 09:42 AM
  2. Creating formula to populate on certain conditions
    By XrisHess in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-15-2015, 09:54 AM
  3. Formula to auto populate field based on or statement
    By suromi in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 01-22-2013, 05:37 PM
  4. Replies: 2
    Last Post: 04-10-2012, 10:38 AM
  5. Replies: 5
    Last Post: 02-03-2012, 05:36 AM
  6. Replies: 3
    Last Post: 08-11-2009, 09:45 AM
  7. How do I populate this field with a formula?
    By THTABE in forum Excel General
    Replies: 2
    Last Post: 05-01-2008, 02:39 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