+ Reply to Thread
Results 1 to 3 of 3

Totalling with VLOOKUP

  1. #1
    Registered User
    Join Date
    05-29-2006
    Posts
    5

    Totalling with VLOOKUP

    Hi All,

    Hope you are all OK.

    I have a little problem that I cannot seem to solve!

    The problem I am having is that I would like to total using the VLOOKUP (or any other command, which i do not know off).

    Here is the scenario

    I have two sheets.

    In sheet 1 have:
    Column A with the weeks (date).
    Column B with numbers.
    Column C with numbers.

    In sheet 2 I have:
    Cell A1 with the date (which I type in)
    Cell A2 displays the number (according to the date that I have typed in Cell A1)

    In Cell A5 I would like to display the total. If in Cell A1
    I type 13/04/09 it would total 30 (06/04/09 & 13/04/09)

    I have attached a spreadsheet for reference.

    Hope I have not confused you totally!

    Thanks in advance.
    Attached Files Attached Files
    Last edited by mbys14932; 04-09-2009 at 06:17 AM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Totalling with VLOOKUP

    is this what you need?

    In sheet 2, A5 =SUMPRODUCT(1*(Sheet1!A1:A3<=$A$1);1*(Sheet1!B1:B3))

    Edit: only this is for 2nd column in 1st sheet... if you want third column just change into:

    =SUMPRODUCT(1*(Sheet1!A1:A3<=$A$1);1*(Sheet1!C1:C3))

    (or extend further for more rows as you need
    Last edited by zbor; 04-08-2009 at 05:53 AM.

  3. #3
    Registered User
    Join Date
    05-29-2006
    Posts
    5

    Re: Totalling with VLOOKUP

    Thanks for the quick reply zbor, that has sorted it!

    Just for reference if anybody else wanted to use the forumula,
    they will have to change the semi colon (';') to a comma (',')

    eg
    In sheet 2, A5 =SUMPRODUCT(1*(Sheet1!A1:A3<=$A$1),1*(Sheet1!B1:B3))

    Edit: only this is for 2nd column in 1st sheet... if you want third column just change into:

    =SUMPRODUCT(1*(Sheet1!A1:A3<=$A$1),1*(Sheet1!C1:C3))

    Thanks.
    Last edited by mbys14932; 04-08-2009 at 06:11 AM.

+ 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