What I want is a Google Appscript that would automatically copy
CONTACTS! row to
SALES! last row when
CONTACTS! row has "SOLD" value in column
THe thing is it also needs to create a new row for every "size" on contacts before adding those rows to SALES. EAch size (is sepparated by commas).
The input example is CONTACTS sheet on the example above The expected output is SALES sheet on the example shet above
The only columns that need to be copied are: Name,Size, Model.
Under sizes it would write the size which is before
- on each value (sepparated by comma).
You can see a final example of how it would look like here after implementing such google app script on sheet
I updated three examples for "SOLD" on sheet 'CONTACTS' based on contacts which reflect on sheet 'SALES'this is the expected output as son as you use SOLD on contacts row.
Additional notes: Trigger should be when a new rowunder sheet CONTACTS gets value "SOLD" under column "STATE"
3) the sold line on the contacts sheet should remain there. It should be copied when the state columns gets value SOLD (which only happens once)
Also its not just to copy SOLD row over to the SOLD sheet but also split the rows into multiple rows before copying so if a contact has multiple "sizes" (its a shoe ecomerce store) one size per row will be written under sold. u can see an example of the expected output here given the SOLD contacts under CONTACTS sheet