+ Reply to Thread
Results 1 to 5 of 5

Create daily transactions using daily prices table

  1. #1
    Registered User
    Join Date
    02-22-2014
    Location
    Wgtn NZ
    MS-Off Ver
    Excel 2010
    Posts
    17

    Create daily transactions using daily prices table

    Hi

    Reposted with attachment

    I need to recalculate daily transactions using a daily pricing table.

    For some days the daily price covers more than one day and I get an error in my vlookup if a price does not exist for the exact day of the transaction.

    What I want to do is have my vlookup use the daily price valid for the day of the transaction.

    e.g Daily price for 7/1/2014 of 1.11 applies for 12/1/2014 and 13/1/2014.

    See attached sample file.

    Regards
    Attached Files Attached Files

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,941

    Re: Create daily transactions using daily prices table

    Instead of =VLOOKUP(A2,Prices!$B$3:$C$30,2,FALSE) try
    =VLOOKUP(A2,Prices!$A$3:$C$30,3,1)
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: Create daily transactions using daily prices table

    Have you considered a Sumifs?
    Drop this into C2 and drag/copy the formula down the list... It should give you what you need
    =SUMIFS(Prices!$C$3:$C$30,Prices!$A$3:$A$30,"<="&$A2,Prices!$B$3:$B$30,">="&$A2)
    Obviously extend your ranges if your list is ever longer (Would set it to max length) if it has no limits and the book is not giant you can just use the entire columns... either way this should do it!
    =SUMIFS(Prices!$C:$C,Prices!$A:$A,"<="&$A2,Prices!$B:$B,">="&$A2)

    -If you think you are done, Start over -

    ELeGault

  4. #4
    Registered User
    Join Date
    02-22-2014
    Location
    Wgtn NZ
    MS-Off Ver
    Excel 2010
    Posts
    17

    Smile Re: Create daily transactions using daily prices table

    Hi EleGault

    Thanks the sumifs formula worked.

    By experimenting I also found that the vlookup formula with true instead of false worked.

    Appreciate your help

    ajob

  5. #5
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: Create daily transactions using daily prices table

    Glad to help - and be careful with true as it will return false negatives if you have similar names within your lookup values.
    -If you think you are done, Start over - ELeGault

+ 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. [SOLVED] Recreate daily transaction using daily pricing table
    By ajob in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-22-2014, 12:48 AM
  2. Daily Allowance Calculation From Previous Daily Spending Against A Daily Budget
    By WillYoung351 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-03-2014, 05:00 PM
  3. Replies: 3
    Last Post: 10-01-2013, 05:05 AM
  4. Replies: 3
    Last Post: 12-06-2010, 09:15 PM
  5. sumproduct multiple daily transactions by date and month
    By jrtaylor in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-09-2009, 11:57 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