rows.com

Discover the smarter way to build formulas that expand with your data.

If you're looking for an efficient way to concatenate data from columns A and B in your spreadsheet while ensuring that your formulas automatically adjust to new data, consider using the dot operator with dynamic ranges.

3 min readMicrosoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

The person asking this question has already found a smarter way to work, and they might not realize it. They are comparing two formulas that both solve the same problem, and they are right to notice that TRIMRANGE does not shorten the syntax. But the real insight here is not about which function wins. It is about the shift from maintaining formulas by hand to letting the spreadsheet do the maintenance for you. That shift is the point, and it is worth pausing on.

When you use =DROP((A:.A&B:.B),1), you are already ahead of the person who drags a formula down 500 rows and hopes the new data appears. You are telling the spreadsheet to look at the entire column, ignore the header, and combine what is there. The problem is that A:.A is a whole-column reference, and whole-column references can be heavy. They pull in more than you need, and they can slow things down as your sheet grows. TRIMRANGE exists to fix that inefficiency. It trims the empty space around your data, so the formula only evaluates the cells that actually have values. That is not a cosmetic improvement. That is a performance improvement, and it matters when your data starts to grow.

So yes, the TRIMRANGE version is longer. But longer is not worse when the longer version does less work. The formula =DROP(TRIMRANGE(A:A)&TRIMRANGE(B:B),1) is not just concatenating columns. It is saying, find the real data, ignore the blank space, and give me the result without dragging. That is a meaningful difference. The user comparing syntax is actually comparing two approaches to the same problem. One is a clever workaround. The other is a cleaner way to think about the problem itself. That is why TRIMRANGE matters, even if the formula looks longer.

The practical takeaway for anyone reading this is simple. Stop measuring your formulas by their length. Measure them by how well they adapt. If you are still dragging formulas down when your data grows, you are fighting the tool. If you are using whole-column references without trimming, you are asking the spreadsheet to do unnecessary work. The smarter path is to combine the two ideas. Use TRIMRANGE to define the range, and let the formula expand naturally as your data does. The next time you add ten rows to columns A and B, your formula in column C should already know what to do. That is the real win, and it has nothing to do with who types fewer characters.

From Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

What is the best way to apply formulas in column C that simply concatenates all of the data in columns A and B, but expands if columns A and B go from 50 rows to say 60 rows with new data so you don’t have to drag down formulas? I have headers in row 1. I’ve been using in C2: =DROP((A:.A&B:.B),1). Now with TRIMRANGE, I can do =DROP(TRIMRANGE(A:A)&TRIMRANGE(B:B),1). However that seems no better with this newer function, and if anything a lengthier formula. What’s the best way to do this?

Read the original at Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community