In my Google Sheets in column F, I want to include the word "LATER" based on magenta color (#ff00ff) that is in column B starting from row 227, how should I write this script?

I'll really appreciate any help provided.

  • I tried to tweak this code webapps.stackexchange.com/questions/47108/… by @Joel Reid, but to no avail
    – Kaka Dante
    Aug 26 '19 at 8:03
  • 1
    If you don't show us what you did, nobody can help you.
    – user55949
    Aug 26 '19 at 8:55
  • Hi @KakaDante - as Joel has flagged in his response, attributes like cell colour are not considered data by Google Sheets. Instead of trying to drive the cell value based on cell colour, consider adding a flag column A, which is used to conditionally format cells in column B as magenta. Then add a column C which displays "LATER" based on the flag value in A. The logic is then driven by the flag value in A, rather than by the cell colour of B.
    – Robbie
    Aug 27 '19 at 2:12
  • Hello @Robyn, thanks a lot for the response sir For the flag to be added, it should a value like either a text or number? Coz if this is the case it is what I did, although the color attribute being considered would have been a huge plus But trying to test Joel's solution there, it worked with the colors rather than text. I dont know if you've tried his solution @Robyn?
    – Kaka Dante
    Aug 27 '19 at 9:33
  • Hello @JanDoggen, the question is just as simple as, if one cell is orange, let another cell display "JAN", Just that simple sir
    – Kaka Dante
    Aug 27 '19 at 9:36
  • Niice @user0, wonderful way there although it didn't fully sort what I wanted Its a good way although when you change/remove the color there "magenta", I expect the text "LATER" to dissapear. Or rather when you autofill the function down along the row and come to add the color afterwards, it doesn't change the values in B, Any workarounds on that pal? Kind Regards.
    – Kaka Dante
    Aug 29 '19 at 20:00
  • @KakaDante as for scalable solution, I would look for onedit script that is able to output hex values and then have a helper column with simple IF statement but not check for color but for hex value outputted via script
    – user0
    Aug 29 '19 at 20:54
  • Do you know of any onedit script that can do this @user0. The many I have tried aren't responding.
    – Kaka Dante
    Aug 30 '19 at 5:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.