Reputation: 567
I'm using this Google-sheets formula for a spreadsheet:
=ArrayFormula(IF(ROW(A1:A1000)+TRUE;"Sometext to show";""))
To fill 1000 columns with the same text, but I think there must be a formula or something more efficient to do so.
Upvotes: 3
Views: 2198
Reputation: 131
The solution really depends on why you want the same information replicated across multiple rows. Does that data ever need to change? If not you possibly don't need the column at all.
Strictly in terms of efficiency it would be better to copy-paste set values into those 1000 rows rather than using a formula, since the formula will need to be evaluated every time the sheet loads.
If you need a dynamic length of repetitions and a dynamic version of text then modify your formula slightly:
=arrayformula(if(row(A:A) <= 1000,"this row is 1000 or less","this row is over 1000"))
This checks all of column A and if the row number is 1000 or less it populates that field with the given text otherwise it fills the row with the alternative text
Upvotes: 0