+ Reply to Thread
Results 1 to 15 of 15

Vlookup to impress my boss

  1. #1
    Registered User
    Join Date
    07-08-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    5

    Vlookup to impress my boss

    Hi there guys and gals,

    I need to use a vlookup function (I think!!) to impress my boss and I hope that someone here can assist (kudos will go to you of course!!) I have 2 spreadsheets with 3 columns each, one spreadsheet for May and one for June. I would like the formula to return results in the 4th and 5th column of the June spreadsheet by looking for the same number in column A and returning the corresponding cells in the next two columns of the May spreadsheet. In other words I need to compare June figures to May's (column B and C in both sheets) based on a common product number (Column A in both sheets). I hope this makes sense!! Pls ask if you need clarification.

    I have now attached the workbook and would like the results to appear in the yellow highlighter area...Hope this helps



    Shanka
    Last edited by shanka; 07-08-2012 at 06:29 AM.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Vlookup to impress my boss

    You get better help if you post an Excel-example of your workbook, without confidential information.

    Make sure the workbook demonstrates your desired results if possible, or just highlight the cells you're trying to fix.

    Use BEFORE/AFTER sheets if that helps make it clearer.

    I think that can be done.

    There are 3 worksheets or 3 workbooks?
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Contributor vikas.bhandari's Avatar
    Join Date
    04-07-2006
    Location
    Delhi, India
    MS-Off Ver
    Office 2007 and 2010
    Posts
    303

    Re: Vlookup to impress my boss

    Suppose you have two files, May and June. First column contains the product number, second column is for Revenue and third is for Products sale count.

    Assuming the above scenario, I have created a sample for you. In which I have added the May number into June's data. You have to ensure that save the both attachments at a single folder and try to open the June.xlsx file.

    Thanks,
    Vikas
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    07-08-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Vlookup to impress my boss

    Thx oeldere, I have replaced my dump with an actual workbook. Cheers for the help!!

  5. #5
    Forum Contributor vikas.bhandari's Avatar
    Join Date
    04-07-2006
    Location
    Delhi, India
    MS-Off Ver
    Office 2007 and 2010
    Posts
    303

    Re: Vlookup to impress my boss

    Enter =VLOOKUP(A5,May!$A$5:$K$2006,10,0) in x 5 and =VLOOKUP(A5,May!$A$5:$K$2006,11,0) in y5 and drag it down.

    Vikas B

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Vlookup to impress my boss

    I made a defined name for the month may.

    Don't work with merged cells, you get problem with it in future use.

    Please add in your text that you hided collums.

    I have the solution for you put in your workbook.

    Do you have questions, on this item, just ask.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    07-08-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Vlookup to impress my boss

    Cheers oeldere, you are an excel god among men!!!!!

  8. #8
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Vlookup to impress my boss

    In X5

    =INDEX(May!J:J,MATCH($A5,May!$A:$A,0))

    Then drag right to Y5 and fill down.

    Or if the 'fineline' codes are always in exactly the same order with no new entries to the list or no old ones removed then just use

    =May!J5


    oeldere

    INDIRECT() is best avoided when possible, especially when it's going to be copied to a large number of cells.
    Last edited by jason.b75; 07-08-2012 at 06:39 AM.

  9. #9
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Vlookup to impress my boss

    Let me know if you understand the formula.

    Otherwise i can help you with that.

  10. #10
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Vlookup to impress my boss

    @jason.b75
    INDIRECT() is best avoided when possible, especially when it's going to be copied to a large number of cells.
    I completely agree with you. In the past I have offered the same advice and provided this link to go with it:

    http://www.decisionmodels.com/calcsecretsi.htm

    But I was accused of being arrogant for doing so.


    @shanka

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save
    Last edited by Cutter; 07-08-2012 at 09:43 AM.

  11. #11
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Vlookup to impress my boss

    @jason.b75 # 8
    @cutter #10

    Both thank you for taking the time to point me on such an important issue. :thumb up:

    @ Cutter the link you added is also usefull, also thank you for that.

    I realy appreciate it.

  12. #12
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Vlookup to impress my boss

    You're welcome. And thank you for accepting the advice in the spirit in which it was given.

  13. #13
    Forum Contributor vikas.bhandari's Avatar
    Join Date
    04-07-2006
    Location
    Delhi, India
    MS-Off Ver
    Office 2007 and 2010
    Posts
    303

    Re: Vlookup to impress my boss

    Cutter, it is a very handy article. I know it is not advisable to start a new topic in the old thread but just taking the spirit of the flow of knowledge in this thread, I would like to ask a simple thing. It says :

    and CELL("Filename") IS volatile although a MSKBN article says its not.
    Assuming you completely understand the logic of above statement, can you explain how did you find it out if Cell("FileName") is volatile? Well, it doesn't need to be volatile and is to be calculated only when we save the file with a different name. Just curious, infact very curious to understand the logic of it.

  14. #14
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Vlookup to impress my boss

    Vikas

    I hope you don't think I'm the author of that article. I'm a complete newbie compared to the author (and a whole lot of others), whom I assume to be Charles Williams.
    I was fortunate enough to have been directed to that link by one of the experts here quite some time ago and I have been referring others to it when the occasion calls for it.
    Mr Williams is pointing out that he has found that that formula is, in fact, volatile despite Microsoft's article that says it isn't volatile. I don't know by what method he would have come to that conclusion. Sorry.

  15. #15
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Vlookup to impress my boss

    Quote Originally Posted by vikas.bhandari View Post
    Just curious, infact very curious to understand the logic of it.
    No information source, just personal theory, please feel free to criticise.

    The string returned by "Filename" includes the sheetname so the function would need to be volatile to recalculate if the sheetname is changed,

    =CELL("Filename")

    Doesn't refer to a specific cell so there is no precedent to trigger recalculation of a non volatile function, even with a cell referenced, a non volatile function would need that cell to be changed to trigger recalculation.

+ 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