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.
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 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.
- Justme123Aug 05, 2020Copper Contributor
Hey, really sorry for late reply.
Your provided solution doesnt work for my situation but that's because I wasnt clear enough on my situation. I'm sorry for that. In the "Final example" attachment you can see how my data is constructed. As you can see from here, the vlookup function wouldn't work because the date of expected arrival is not on the leftside of the data-table we would like to index for.
Again there's two conditions which first one (E-column) is that it needs to be type 1 and the second condition (I-column) is that it needs to be type A.
Again I would love to get a formula that tells me in the c-column, that how much stuff is in storage in each day.
I unfortunately don't have access to xlookup but I can use use of helper cells.