How to write macro or script to correct spreadsheet row entries

Hello! I hope you are well, and in a pleasant frame of mind.

I would like to automate correcting row entries. Whether it’s a macro or a script, I’d like to run a routine that:

  1. Looks in each row for specific values in specified cells (specified columns);
  2. When those values are found, writes specific values (text) in other specified cells (specified columns).

I imagine the logic would be “If the value in [column x1 name] = [value a1] and the value in [column x2 name] = [value a2] then write in [column x3] [value z1], write in [column x4] [value z2],…”

How may I go about this?
I have next to zero experience writing code or macros.

Thank you.

Sounds like what the built in AutoCat tool does, but AutoCat only works on one condition, I don’t think there’s a way to have it ‘AND’ multiple conditions. If you want multiple conditions, then yea, you’d have to use Google Apps Script to create a script, which is JavaScript based. I have some scripting experience and have been able to do a few simple things with it, but it would be difficult if you don’t have prior scripting experience.

1 Like

I appreciate your response. Thank you.

Your question here reminds me of my days in algebra :flushed:

But I do think AutoCat can do what you’re asking.

You’d want to read up and experiment with the Advanced Rules. You can have it look at multiple columns at once to see if it matches a filter criteria, you can also created “multi-criteria” filters on a single column. And it can write out data to columns other than the Category column if they exist in your AutoCat sheet too. You can experiment easily by toggling on the Advanced Rule Builder setting in the sidebar from Tiller Money Feeds > AutoCat

AutoCat advanced rules help doc

1 Like