Write a Google Sheet function that fills in this pattern: Column A: 19795 19807 20014…
- User
Write a Google Sheet function that fills in this pattern:
Column A: 19795 19807 20014 20083 .. ...
Column J - the one I want to fill: https://vha.usc.edu/testimony/19795?from=search https://vha.usc.edu/testimony/19807?from=search https://vha.usc.edu/testimony/20014?from=search https://vha.usc.edu/testimony/20083?from=search ...
- Assistant
You can generate that URL pattern in Column J with a simple Google Sheets formula. If your numbers are in Column A, starting at A2, then in J2 enter: excelCopyEdit=IF(A2<>"","https://vha.usc.edu/testimony/" & A2 & "?from=search","")
Then drag/fill down, or double-click the fill handle to auto-populate for all rows where column A has values.
✅ How it works:
A2<>"" → checks that column A isn’t empty.
Concatenates the base URL + the number from column A + ?from=search.
If you prefer to use an array formula (so the entire column fills automatically), you can put this in J2: excelCopyEdit=ARRAYFORMULA(IF(A2:A<>"","https://vha.usc.edu/testimony/" & A2:A & "?from=search",""))
That way, Column J will auto-fill for every entry in Column A without dragging.
Do you want me to also show you how to make this into a custom function in Apps Script, so you can just type something like =MAKEURL(A2:A)?