Hi,
My app displays the photos of the users…acuser might upload 2 photo a user might upload 3 ( maximum is 5 photos)…the link of the photo is stored in column name image2,2,3,4,5 …
My requirement is I want to shuffel images randomly so that a user sees different images daily in his profile …
How can I achieve it in Google sheet…
I think the only way is separating those images into different columns with a Google Script and then use the Sort order - Random for displaying the images
I agree, if you want just 1 random image shown per day, then have a column that just says =rand(a1,a2,a3)
and it should randomize those images. The issue with this is that every time the page is updated the image will change. So it wont be a daily change. The way to fix that would be to have a cell populate the current date using the now() function and whenever the page is updated it checks to see if the date matches, if it doesnt it will randomize otherwise do nothing so lets say the random cell is a4, and cell a5 has todays date in it it would look something like this:
a4 would be =IF(A4=A5,"",NOW())
And the cell that is randomizing would be: IF($A$4=$A$5,"",RAND(A1,A2,A3))
It would look something like that, and once you had the first formula made you could copy and past down the line just make sure you keep the $ so the cells don’t change when you copy and paste.
Also, this does create a circular reference so in google sheets go to file, spreadsheet settings, calculation tab and turn on iterative calculation leave the numbers at default or lower but do not increase the number of iterations or threshold and under recalculation change it to on change and every minute.
Thank you very much…will try this out…
The solution worked… thank you very much
which solution did you use if you dont mind me asking?
I used IF($A$4=$A$5,"",RAND(A1,A2,A3)) Solution
Nice If you need any more help dont hesitate to ask.