Best answer

How do I copy formulas with relative references in Google Sheets when adding new rows?


Userlevel 1
Badge

I have a google sheet that my zap is entering a row into when it runs.  The last column of the spreadsheet is doing a vlookup from another tab in the same spreadsheet to return a Yes or a No response in that column.  The last column is I and the formula looks like this for something that would be in Row 3 of the spreadsheet, looking up something from column A into worksheet named WAIVERS.

=if(isblank(A3),"",if(isna(vlookup(A3,WAIVERS!A:A,1,FALSE)),"No","Yes"))

If I were to prefill that formula it would be overwritten by the zap.  I could have the zap fill that formula in as part of the run if I could have it use a relative reference.  So when it gets to row 4 it would need to be A4, not A3.  Is there a way to pass that information to the zap?  If I could look up the next blank row I could fill that in, but I don’t see a way to do that.

icon

Best answer by Troy Tessalone 4 May 2024, 19:56

View original

3 replies

Userlevel 7
Badge +14

Hi @Mountainears 

Help article to reference:

 

Userlevel 1
Badge

Once again @Troy Tessalone , you are the king of the solutions :-) 

I updated the formula to what is below and it’s working great.  Thanks.

 

=if(isblank(indirect("A" & row())),"",if(isna(vlookup(indirect("A" & row()),WAIVERS!A:A,1,FALSE)),"No","Yes"))

Userlevel 7
Badge +6

That’s awesome @Mountainears! A huge thanks to Troy for pointing you in the right direction!

If you have any other questions, please don’t hesitate to reach out to the Community. We’re always happy to help! 🤗

Reply