+ Reply to Thread
Results 1 to 3 of 3

Searching for a date in date ranges and more

  1. #1
    Registered User
    Join Date
    09-25-2012
    Location
    Oregon
    MS-Off Ver
    2010
    Posts
    2

    Searching for a date in date ranges and more

    Ok, so a little precursor, I'm ok at excel just not that familiar with it. I am in Accounts payable and as part of my job I have to check on fuel surcharges which requires me to look at some tables in excel. My problem is they are separate. When trying to decide on a price you first search for a date which will give you the price of the gas. With that price you find the price in a certain range of prices which will give you the contract fuel price.

    For example:

    I want to find the fuel price for 09/25/12.

    09/16/12 to 09/22/12 = 4.132 (DOE price) = 4.110-4.169 = 1.50
    09/23/12 to 09/29/12 = 4.135 (DOE price) = 4.110-4.169 = 1.50
    09/30/12 to 10/06/12 = 4.086 (DOE price) = 4.050-4.109 = 1.47

    So if I search for 09/25/12 it falls in the 09/23/12 to 09/29/12 range which then tells me in the end that the contract price is 1.50.

    There is no need to calculate the amounts because it is a set contract. The date ranges are constant and the first price is released by the DOE every week. So the table is always going to be the same except for the DOE price.


    What I wish to do to save time, is to be able to search for a date and have the rest of the information appear or highlight. I am not even sure if this is possible in excel. I am also not sure if you all will need more information. Any help would be greatly appreciated, even if someone could give me a good starting point. Thank you!!!

  2. #2
    Registered User
    Join Date
    09-25-2012
    Location
    Oregon
    MS-Off Ver
    2010
    Posts
    2

    Re: Searching for a date in date ranges and more

    Please help!

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Searching for a date in date ranges and more

    if all your data is in separate columns, use vlookup()

    assuming 10 columns (A:J), try this...
    =VLOOKUP(M1,$A$1:$j$3,11,TRUE)

    if that doesnt work for you, upload a sample workbook for me to look at
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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