Forum Discussion
Return a corresponding value if the date is found in dataset
- Aug 03, 2020
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.
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.
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_EekelenAug 03, 2020Platinum 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.
- Justme123Aug 03, 2020Copper Contributor
Oh sorry for being confusing.
The types just means that those are additional conditions that need to be fulfilld to include the sales for that specific day.
In the Picture, which I've posted under my previous reply, I would love the formula, in B "Sum" column, exclude the "23 €" sales from 17.8.2020 as its type 1 and type 2 are wrong.
Can you post an example in this situation?
But thank you very much.
- Riny_van_EekelenAug 03, 2020Platinum Contributor
Justme123 Perhaps like int he attached file, provided you are willing to accept the use of a few "helper" cells (shaded green). Just to make it more transparent.