Forum Discussion
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.
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
- NikolinoDEPlatinum Contributor
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)
- Justme123Copper Contributor
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!
- Riny_van_EekelenPlatinum Contributor
Justme123 Perhaps this is what you need in B2 and copy it down.
=N(B1)+IFERROR(VLOOKUP(A2,G:H,2,FALSE),0)The attached file contains an example based on your picture.
- Justme123Copper Contributor
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_EekelenPlatinum 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.