Results 1 to 3 of 3

Thread: If date < = list range, return value

  1. #1
    Board Regular Weeble's Avatar
    Join Date
    Nov 2016
    Location
    Sweden
    Posts
    75
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default If date < = list range, return value

    I have a table with different dates in column A
    a b c d
    2017-01-15 Apples 5
    2017-02-15 Apples 4

    I also have a list with different prices depending on the time of date.

    2017-01-01 25,5 $
    2017-02-01 27,6 $
    2018-01-01 32,4 $

    I want to make a formula in D column that goes similiar. " IF col A =< Date from my list ; C * value from list )

    So if the apples have been sold 2017-01-15 or earlier than that the calculated price should be 25,5.
    But if it's been sold between 2017-02-01 and less than 2018-01-01 the price should be 27,6.

    How would I do this an easy way?

  2. #2
    Board Regular
    Join Date
    Nov 2006
    Location
    London
    Posts
    8,176
    Post Thanks / Like
    Mentioned
    20 Post(s)
    Tagged
    2 Thread(s)

    Default Re: If date < = list range, return value

    =INDEX(E1:E3,MATCH(A1,D1:D3,1),1)

    where A1 is your apple date
    D1:D3 are your price table dates
    E1:E3 are your prices

  3. #3
    Board Regular Weeble's Avatar
    Join Date
    Nov 2016
    Location
    Sweden
    Posts
    75
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Re: If date < = list range, return value

    it's so simple that I even forgot that you can put a 1 instead of 0.
    Thank you

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •