I had hoped @bogdan666 would come back with some updated code of his own.
but hey, here you go full solution curtesy of @pcbbc
(just make sure to have the right type for V1, V2, V3 and V4)
an alternative is keeping the previous value and merging it with the new reading with some coefficient, for example 90% of the previous value plus 10% of the new reading if you want to smooth out changes or if you want fast reaction to change increase the %age for the new reading.
Are you sure you really need it?...
A RC at the input could be a simpler solution. You could also make a 2nd order filter, using a 10x resistor in the second filter.
You also have to make sure that the ground circuit is correct, otherwise it adds noise to the reading.