+ Reply to Thread
Results 1 to 13 of 13

VLOOKUP problem

  1. #1
    Registered User
    Join Date
    06-15-2014
    Posts
    19

    VLOOKUP problem

    Hi. I don't know what kind of Function i should use on my data. Please help me on this:
    Sheet 1
    A B C D E
    1 MONDAY JUNE 25 30 50
    2 MONDAY JULY 15 10 45
    3 MONDAY AUGUST 11 35 60
    4
    5

    Sheet 2
    input: MONDAY
    input: JULY

    RESULT:

    A B C
    15 10 45

    On the example above, SHEET 2 is the one i want to be the result.. so I will only input the word "MONDAY"
    and "JULY" then the result will be 15 10 45.

    Hope someone can help me on this.. thanks

  2. #2
    Forum Contributor WinteE's Avatar
    Join Date
    04-07-2007
    Location
    Netherlands
    Posts
    544

    Re: VLOOKUP problem

    =sumproduct((a1:a3="monday")*(b1:b3="july")*(c1:c3))
    Just keep it simple !


    http://www.excelguide.eu
    In English as well as in Dutch

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,591

    Re: VLOOKUP problem

    See the attached example


    Regards, TMS
    Attached Files Attached Files
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,591

    Re: VLOOKUP problem

    WinteE's solution is nicer, avoiding the Array Formula.


    See attached updated example.


    Regards, TMS
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-15-2014
    Posts
    19

    Re: VLOOKUP problem

    Quote Originally Posted by TMS View Post
    WinteE's solution is nicer, avoiding the Array Formula.


    See attached updated example.


    Regards, TMS
    yes this one works but what if for example i want the 15 10 45 to be put on COLUMN E, COL F, COL G? Because when i tried to move the formula on column F, it gives me "#REF!"...

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,591

    Re: VLOOKUP problem

    We have both made assumptions based on the simplistic example you have provided. Both solutions address the question posed in a hypothetical scenario.

    If you want a solution that matches your real life situation, you would do better to post a sample workbook with some typical data and formula.


    Regards, TMS

  7. #7
    Forum Contributor WinteE's Avatar
    Join Date
    04-07-2007
    Location
    Netherlands
    Posts
    544

    Re: VLOOKUP problem

    The =SUMPRODUCT() in the example of TMS is fixed. Wherever you cut/paste this formula, the results will be the same.

  8. #8
    Registered User
    Join Date
    06-15-2014
    Posts
    19

    Re: VLOOKUP problem

    Quote Originally Posted by TMS View Post
    We have both made assumptions based on the simplistic example you have provided. Both solutions address the question posed in a hypothetical scenario.

    If you want a solution that matches your real life situation, you would do better to post a sample workbook with some typical data and formula.


    Regards, TMS
    oh ok, but i am just a newbie here and i really don't have much experience on asking questions on a forum like this.. and i really don't have idea on how formula works on excel so i thought the formula that you gave me might also work on other situation.. but if you don't want to answer my question anymore that's fine.

    thanks anyway!!

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,591

    Re: VLOOKUP problem

    If you select the cell and copy and paste it, the cell references will adjust. You need to press F2 to edit the formula, select all the text in the formula box and copy it, then press Cancel.. Now go to the cell where you want the formula and paste it.

    Regards, TMS

  10. #10
    Registered User
    Join Date
    06-15-2014
    Posts
    19

    Re: VLOOKUP problem

    ok.. thanks a lot to both of you guys!!


  11. #11
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,591

    Re: VLOOKUP problem

    You're welcome.

  12. #12
    Forum Contributor WinteE's Avatar
    Join Date
    04-07-2007
    Location
    Netherlands
    Posts
    544

    Re: VLOOKUP problem

    It's not that we don't want to answer you.

    You have to learn to 'read' the formula.

    =sumproduct((a1:a3="monday")*(b1:b3="july")*(c1:c3))

    a1:a3 stands for range a1 till a3. Where it is MONDAY it is TRUE, value = 1. Otherwise the value is 0.
    b1:b3 stands for range b1 till b3. Where it is JULY it is TRUE, value = 1. Otherwise the value is 0.
    c1:c3 stands for range c1 till c3. This is the column your searching the value, in this case that'll be 15.

    =sumproduct( 1 * 1 * 15 ) is 15 . On row 1 it would be = sumproduct( 1 * 0 * 10 ) = 0. Because JUNE is not equal to JULY.

  13. #13
    Registered User
    Join Date
    06-15-2014
    Posts
    19

    Re: VLOOKUP problem

    Quote Originally Posted by WinteE View Post
    It's not that we don't want to answer you.

    You have to learn to 'read' the formula.

    =sumproduct((a1:a3="monday")*(b1:b3="july")*(c1:c3))

    a1:a3 stands for range a1 till a3. Where it is MONDAY it is TRUE, value = 1. Otherwise the value is 0.
    b1:b3 stands for range b1 till b3. Where it is JULY it is TRUE, value = 1. Otherwise the value is 0.
    c1:c3 stands for range c1 till c3. This is the column your searching the value, in this case that'll be 15.

    =sumproduct( 1 * 1 * 15 ) is 15 . On row 1 it would be = sumproduct( 1 * 0 * 10 ) = 0. Because JUNE is not equal to JULY.
    I have idea on how to use the sumproduct but the one TMS gave me was something new to me so i don't understand the functions used on it.. yeah, i thought it would be the same as sumproduct that you can copy/paste on different cell..

+ 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. Vlookup problem in a loop with cell property and variable cell problem (long title sry)
    By ExcelsiorLux in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-13-2013, 10:38 AM
  2. Replies: 6
    Last Post: 05-28-2013, 05:08 PM
  3. vlookup? match? index? MULTIPLE criteria for vlookup search problem....
    By aborg88 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-11-2013, 09:56 AM
  4. vlookup problem and count problem
    By thy00123 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-05-2009, 04:31 AM
  5. VLOOKUP Problem
    By keithfender in forum Excel General
    Replies: 3
    Last Post: 05-28-2009, 10:31 AM

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