Forum Discussion

Justme123's avatar
Justme123
Copper Contributor
Aug 03, 2020
Solved

Return a corresponding value if the date is found in dataset

Hey, 

the attachement picture shows my problem.

I want a function to column b that calculates the last days value and adds sales from h column if the corresponding date, in A column, is in the G column. So for example B4 should get the value from B3 and H4 (15€) and add them together. 

 

Unfortunately I cannot use VLOOKUP in this context as in the real example, the data is not structured for that. 

 

Thank you so much for the one who can help me. 

  • Justme123's avatar
    Justme123
    Aug 03, 2020

    Riny_van_Eekelen 

     

    First of all, thank you for your quick reply.  You're already a livesaver. Unfortunately I (think I) can't use VLOOKUP as the "sum" column is before the "dates" column.  I also have two more conditions I need to fulfill. I've attached a Picture for reference.

     

    The conditions are these: Type 1 should be A and type 2 should be 1. 

     

     

10 Replies

  • NikolinoDE's avatar
    NikolinoDE
    Platinum Contributor

    Justme123 

    I'm not sure, because the translation is not the best, nor my English either, send you a small solution.
    The formula is in column B.

     

     

    If you find this helpful, please mark it as "Best Answer" and as Like (click thumbs up), it will be beneficial to more Community members reading here.

     

    Nikolino

    I know I don't know anything (Socrates)

     

    • Justme123's avatar
      Justme123
      Copper Contributor

      NikolinoDE

       

      Hey, sorry this is not what I'm looking for. I think you made a mistake because in your file, there's only one cell that has a value.


      Please reference to the other answers, to see what I want to do.

       

      Thank you though regardless! 

    • Justme123's avatar
      Justme123
      Copper Contributor

      Riny_van_Eekelen 

       

      First of all, thank you for your quick reply.  You're already a livesaver. Unfortunately I (think I) can't use VLOOKUP as the "sum" column is before the "dates" column.  I also have two more conditions I need to fulfill. I've attached a Picture for reference.

       

      The conditions are these: Type 1 should be A and type 2 should be 1. 

       

       

      • Riny_van_Eekelen's avatar
        Riny_van_Eekelen
        Platinum Contributor

        Justme123 Not sure I follow what you want with the types. VLOOKUP works just fine with the structure in your examples. If I'm mistaken, yu can use XLOOKUP in case you are a modern version of Excel.

         

         

Resources