+ Reply to Thread
Results 1 to 3 of 3

VLookup question

  1. #1
    Registered User
    Join Date
    03-06-2009
    Location
    Birmingham
    MS-Off Ver
    Excel 2003
    Posts
    12

    VLookup question

    Hi guys, I am after a bit of help from those in the know again if possible.

    I have been asked to compile a database at work, what I want to do is display a sum value of figures from a table if the date falls within a specified range.

    This is based on invoices so I could have for e.g

    10/12/08 - Inv3874 - £1000
    13/12/08 - Inv7264 - £6000
    16/12/08 - Inv5636 - £2000

    I am trying to get a formula to display this within two adjacene cells on a sumary sheet

    e.g.

    Dec-08 / £9000

    The Dec 08 I would input myself

    I have a similar one which I calculated number of invoices for which I used:
    =COUNTIF('Input 1'!D:D,">="&DATE(2008,10,1))-COUNTIF('Input 1'!D:D,">="&DATE(2008,10,31))

    would this need to be included, not sure if I should use sumif?

    Any help would be much appriciated

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: VLookup help?

    Yes 2 SUMIF's would be best... if you're running XL2007 you can use SUMIFS ... others may offer SUMPRODUCT but I'd still say SUMIF would be preferable given only 1 real condition (date).

    If we assume say A1 holds the date (1st of Month) and B1 the result:

    B1: =SUMIF('Input 1'!D:D,">="&A1,'Input 1'!F:F)-SUMIF('Input 1'!D:D,">"&DATE(YEAR(A1),MONTH(A1)+1,1),'Input 1'!F:F)

    *note your countif example - the operator in the 2nd test should be > rather than >= I suspect (ie 31st Oct is a valid date and should not be excluded from the count)
    Last edited by DonkeyOte; 04-22-2009 at 05:49 AM.

  3. #3
    Registered User
    Join Date
    03-06-2009
    Location
    Birmingham
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: VLookup help?

    Thats excellent, thank you very much for your help!

+ 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