+ Reply to Thread
Results 1 to 7 of 7

Vlookup

  1. #1
    Registered User
    Join Date
    05-23-2006
    Posts
    3

    Vlookup

    Hi,
    I'm a newbie to excel,

    I need to lookup for a string for ex "Brew" or "Lunch" in column 3 and find the value of the cell in the same row and column 4. Add all these values and the sum should be displayed in say g3.

    Thanks for all your help

  2. #2
    Ardus Petus
    Guest

    Re: Vlookup

    =SUMPRODUCT(--(C1:C999="Brew"),D1:D999)

    HTH
    --
    AP

    "kaushik" <[email protected]> a écrit
    dans le message de news:
    [email protected]...
    >
    > Hi,
    > I'm a newbie to excel,
    >
    > I need to lookup for a string for ex "Brew" or "Lunch" in column 3 and
    > find the value of the cell in the same row and column 4. Add all these
    > values and the sum should be displayed in say g3.
    >
    > Thanks for all your help
    >
    >
    > --
    > kaushik
    > ------------------------------------------------------------------------
    > kaushik's Profile:
    > http://www.excelforum.com/member.php...o&userid=34715
    > View this thread: http://www.excelforum.com/showthread...hreadid=544812
    >




  3. #3
    Registered User
    Join Date
    05-23-2006
    Posts
    3
    Hi HTH,

    Thanks for your quick response.

    Extrapulating my earlier question. How do I do the same if the columns are in a different sheet. How do I reference to a different sheet.

    Thanks a lot for your help.
    -Kaushik

  4. #4
    Tom Ogilvy
    Guest

    Re: Vlookup

    If that formula would produce the correct answer, then
    Faster would be

    =sumif(C:C,"Brew",D:D)

    --
    Regards,
    Tom Ogilvy


    "Ardus Petus" wrote:

    > =SUMPRODUCT(--(C1:C999="Brew"),D1:D999)
    >
    > HTH
    > --
    > AP
    >
    > "kaushik" <[email protected]> a écrit
    > dans le message de news:
    > [email protected]...
    > >
    > > Hi,
    > > I'm a newbie to excel,
    > >
    > > I need to lookup for a string for ex "Brew" or "Lunch" in column 3 and
    > > find the value of the cell in the same row and column 4. Add all these
    > > values and the sum should be displayed in say g3.
    > >
    > > Thanks for all your help
    > >
    > >
    > > --
    > > kaushik
    > > ------------------------------------------------------------------------
    > > kaushik's Profile:
    > > http://www.excelforum.com/member.php...o&userid=34715
    > > View this thread: http://www.excelforum.com/showthread...hreadid=544812
    > >

    >
    >
    >


  5. #5
    Ardus Petus
    Guest

    Re: Vlookup

    Nice shot, Tom!

    Since I discovered SUMPRODUCT, I do everything with it

    Cheers,
    --
    AP

    "Tom Ogilvy" <[email protected]> a écrit dans le message
    de news: [email protected]...
    > If that formula would produce the correct answer, then
    > Faster would be
    >
    > =sumif(C:C,"Brew",D:D)
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    > "Ardus Petus" wrote:
    >
    >> =SUMPRODUCT(--(C1:C999="Brew"),D1:D999)
    >>
    >> HTH
    >> --
    >> AP
    >>
    >> "kaushik" <[email protected]> a écrit
    >> dans le message de news:
    >> [email protected]...
    >> >
    >> > Hi,
    >> > I'm a newbie to excel,
    >> >
    >> > I need to lookup for a string for ex "Brew" or "Lunch" in column 3 and
    >> > find the value of the cell in the same row and column 4. Add all these
    >> > values and the sum should be displayed in say g3.
    >> >
    >> > Thanks for all your help
    >> >
    >> >
    >> > --
    >> > kaushik
    >> > ------------------------------------------------------------------------
    >> > kaushik's Profile:
    >> > http://www.excelforum.com/member.php...o&userid=34715
    >> > View this thread:
    >> > http://www.excelforum.com/showthread...hreadid=544812
    >> >

    >>
    >>
    >>




  6. #6
    Ardus Petus
    Guest

    Re: Vlookup

    (With Tom's nice suggestion):
    =SUMIF(Sheet2!C:C,"Brew",Sheet2!D:D)

    Cheers,
    --
    AP

    "kaushik" <[email protected]> a écrit
    dans le message de news:
    [email protected]...
    >
    > Hi HTH,
    >
    > Thanks for your quick response.
    >
    > Extrapulating my earlier question. How do I do the same if the columns
    > are in a different sheet. How do I reference to a different sheet.
    >
    > Thanks a lot for your help.
    > -Kaushik
    >
    >
    > --
    > kaushik
    > ------------------------------------------------------------------------
    > kaushik's Profile:
    > http://www.excelforum.com/member.php...o&userid=34715
    > View this thread: http://www.excelforum.com/showthread...hreadid=544812
    >




  7. #7
    Tom Ogilvy
    Guest

    Re: Vlookup

    I agree it is very powerful, but because of the way array formulas perform
    (and it performs like an array formula) they can be very slow for large
    ranges (I am sure you know that - put just repeating here for completeness).
    So for single conditions, I try to use sumif or countif if possible and
    leave the heavy lifting for sumproduct or an array formula when required.

    --
    Regards,
    Tom Ogilvy


    "Ardus Petus" wrote:

    > Nice shot, Tom!
    >
    > Since I discovered SUMPRODUCT, I do everything with it
    >
    > Cheers,
    > --
    > AP
    >
    > "Tom Ogilvy" <[email protected]> a écrit dans le message
    > de news: [email protected]...
    > > If that formula would produce the correct answer, then
    > > Faster would be
    > >
    > > =sumif(C:C,"Brew",D:D)
    > >
    > > --
    > > Regards,
    > > Tom Ogilvy
    > >
    > >
    > > "Ardus Petus" wrote:
    > >
    > >> =SUMPRODUCT(--(C1:C999="Brew"),D1:D999)
    > >>
    > >> HTH
    > >> --
    > >> AP
    > >>
    > >> "kaushik" <[email protected]> a écrit
    > >> dans le message de news:
    > >> [email protected]...
    > >> >
    > >> > Hi,
    > >> > I'm a newbie to excel,
    > >> >
    > >> > I need to lookup for a string for ex "Brew" or "Lunch" in column 3 and
    > >> > find the value of the cell in the same row and column 4. Add all these
    > >> > values and the sum should be displayed in say g3.
    > >> >
    > >> > Thanks for all your help
    > >> >
    > >> >
    > >> > --
    > >> > kaushik
    > >> > ------------------------------------------------------------------------
    > >> > kaushik's Profile:
    > >> > http://www.excelforum.com/member.php...o&userid=34715
    > >> > View this thread:
    > >> > http://www.excelforum.com/showthread...hreadid=544812
    > >> >
    > >>
    > >>
    > >>

    >
    >
    >


+ 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