+ Reply to Thread
Results 1 to 8 of 8

Trying to create IF statement to populate cell with Vlookup Data

  1. #1
    Registered User
    Join Date
    08-08-2007
    Posts
    80

    Trying to create IF statement to populate cell with Vlookup Data

    I have a two workbooks of data. The First workbook contains all the products that my company is trying to produce while the other workbook has data from a plant we use that shows what they say we have told them to produce. I've been comparing both spreadsheets in order to see if this plant has the same data as we do at the main office.

    So far I have 3 Vlookups that ask:

    1) Is the specific job on the Plant workbook on the main workbook?

    2) Is the specific job on the Plant workbook on the main workbook, but within the Option A sheet?

    3) Is the specific job on the Plant workbook on the main workbook, but within the discontinued sheet?

    I have each Vlookup returning a simple "yes" or "no". I wish to find a way to populate another column that will list the reason why the job is discontinued, if of course it is on the discontinued sheet.

    So I would only look on the "Is it Discontinued" column for instances of the word "yes". On the Discontinued sheet, there is a column that says a few words on why the job was discontinued. I would like to find a way of creating an IF statement that would basically say:

    IF - Discontinued Vlookup column says yes - populate cell with the '[MainWorkbook]DiscontinuedSheet'DiscontinuedReason for that specific job #.

    I know this could be done by an IF statement, but I'm not sure how to accomplish this. The Vlookup I've created to give a better perspective on how the spreadsheets are setup is like this:

    =IF(ISNA(VLOOKUP(A2,'[MainWorkbook.xls]Discontinued'!$1:$10000,1,FALSE)),"No","Yes")

    I know the IF statement would get this done, just not sure how to handle the True statement.

    Any help would be awesome!!

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Trying to create IF statement to populate cell with Vlookup Data

    All of that sounds reasonably doable. Please upload an smaller example excerpt of your actual workbook demonstrating all of this, manually mockup the final result cell, highlight it so we know for sure where you want a formula.

    Click GO ADVANCED and use the paperclip icon to post up a desensitized copy of your workbook.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    01-19-2011
    Location
    Easton, MD
    MS-Off Ver
    Excel 2003
    Posts
    2

    Question SUM with a stop total, when the total exceeds the stop total

    Hello experts, I have a fixed number in a cell of 76. I have 31 cells below the cell with 76 which I place a number each day, which by the end of the month the total may exceeds 76. Even though the total count goes above 76, 80, 90, etc., over 76, I want to see each days sum, to sum up to 76 and any sum over 76 will not count but simply stay at 76, even though it may go to 120 in the 31 days. Thanks,

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Trying to create IF statement to populate cell with Vlookup Data

    Try this, adjust the range reference as needed:

    =MIN(76, SUM(A2:A32))

  5. #5
    Registered User
    Join Date
    08-08-2007
    Posts
    80

    Re: Trying to create IF statement to populate cell with Vlookup Data

    Quote Originally Posted by JBeaucaire View Post
    All of that sounds reasonably doable. Please upload an smaller example excerpt of your actual workbook demonstrating all of this, manually mockup the final result cell, highlight it so we know for sure where you want a formula.

    Click GO ADVANCED and use the paperclip icon to post up a desensitized copy of your workbook.
    I'll be working on this when I get to work (I work 2nd shift, so bear with me).

  6. #6
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Trying to create IF statement to populate cell with Vlookup Data

    Gallagwi

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.

  7. #7
    Registered User
    Join Date
    08-08-2007
    Posts
    80

    Re: Trying to create IF statement to populate cell with Vlookup Data

    Attached are the examples for this situation. Any questions or additional information that needs to be supplied let me know.

    Quick explanation: IF a sku in the column "Is it in Discontinued??" is populated with the word "Yes" within the comparison workbook, call to the main workbook; spreadsheet discontinued and find the specific sku in question and populate with the "Rebranded option??" cell information.

    Just as a side note, I love arthurbr's profile picture.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    08-08-2007
    Posts
    80

    Re: Trying to create IF statement to populate cell with Vlookup Data

    Is the examples not enough? If you need more I'll see what I can scrap up.

    Thanks again!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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