I want to scrape this website[1] for dividend payouts and payout dates (called "utdelningar") in the right lower part. Using the following importxml[2] i get the entire list of dates etc that i want but what i want is to then loop the entire thing and check for the closest date for "=today()" function in google sheets and only write out that date and ignore any dates that are already past or way ahead in the future.
I need to do this as some stocks have the next or past dividend date as the first[3] and other stocks have future dates (like [2]) last. If it wasn't like this with the dates then this would be very easy for me.
[1] https://www.avanza.se/aktier/om-aktien.html/1025156/fastpartner-d
[2] =IMPORTXML("https://www.avanza.se/aktier/om-aktien.html/1025156/fastpartner-d"; "(//table[@class='solidRows tableV2 tightLayout highlightOnHover solidThinEnding tRight'])//tr")