this is my first post here, so sorry if my question will be unclear.
I want to, using Google Sheets, send personalized emails but first I need to create a script. Below is an empty example of my table.
I need that this spreadsheet checks if there are cells with a yellow background in the row. If this condition is true, pick value of the header in the column where is a yellow cell and put this value into a variable as a string. Then pick value of this yellow cell and join this value to the same variable.
Same situation for every row with yellow cell
Example: I want to check this condition for Mike Doe row. There are two yellow cells F2 and G2. First, if it's found an F2 cell, should pick header value (04.2017) and join it to the variable as a string. Then should pick the value of the cell F2 (50) and also join it the same variable. For now, our variable has value = "04.2017 - 50". Next should check another yellow cell (G2) in the same row and do exactly same thing. So at the end of this row, the variable should have value = "04.2017 - 50, 05.2017 - 50". When script finish checking this row, should put the whole value of this variable at the Message cell.
Below is shared an empty example.
https://docs.google.com/spreadsheets/d/1ZmVaEw6QS0V1A401U9l6wi2ppWfylKU74eTK4bxZlOU/edit?usp=sharing
I hope, that everything is clear. I'll be very grateful is someone help me.