I am looking for help with Google Sheets on how to activate an OnEdit script for cells that do not have a static row address (but do have a defined column) and also cells that may not exist yet until created by one of these OnEdit scripts. To explain....
I am creating a google sheets workbook template to help put together project costs and compare the costs of all needed materials from competing vendors. For example, say we're building a woodshed. "Woodshed" will be project name, and each material needed to build it will be a "product" within the project (5d nails, 2x4s, etc). Then, under each product there is the option to put in multiple difference sources (home depot, Ace Hardware, etc) for the same product and their various prices.
I am attempting to set up multiple dropdown cells in Column N to function like "buttons" that will activate OnEdit scripts to insert additional, properly formatted rows for adding new material sources, or new products, or entire additional projects into the same sheet whenever someone uses a dropdown to select a specific value. E.g., open the dropdown that says "Add New Source(s) for 5d nails (select quantity)." Say you select "3" from the dropdown, it would then add 3 new, properly formatted rows under the "5d nail" product section for adding details about 3 new 5d nail vendors and their pricing.
(I am avoiding using regular clickable "buttons" because that functionality does not work on mobile versions of google sheets yet)
MY PROBLEM:
The very function of these scripts will be to add new rows, which will affect the cell address for any dropdown OnEdit cells located further down in the sheet. Likewise, each new product or project added to this workbook via these buttons will require its own, NEW "Add new..." dropdown button of its own which obviously is pretty difficult to account for in the script.
I would welcome any ideas on how to go about this, if it's even possible??
The following workbook is my work-in-progress google sheet, feel free to copy to a new workbook and play with it: https://docs.google.com/spreadsheets/d/1J3cS3FmVxycs0bbuTPyIxoKZ-C0ojSIHHc4z9DmlNqs/edit#gid=662584781