Excel Tip - Concatenating Ranges of Cells

Every once in a while I get an Excel file that I need to pull data from to use as an in list for a query. I've blogged before about a cool technique that I use to do this (the quick and dirty method). Well, someone just recently requested my help in creating a quick in list out of several hundred elements for use in running a Business Objects report (On a side note - I hate Business Objects). I would have normally used my method, but the only problem with that method is that you have to explicitly tell Excel which cells to concatenate like so:

=concatenate(a1,b1,c1...z1)

Also, there is a limit as to how many cells you can concatenate by default in Excel (30).

So, feeling especially lazy today I decided to Google a solution and found this pretty cool answer. It's a custom Excel function that allows you to specify a range of cells to concatenate. Just paste this macro into your project (instructions on where to stick it are here) and call it like so (the second arguments is optional, but will insert a delimiter between each item):

=multicat(a1:z1, ",")

That's it for me for the week. I'm off to the wife's Christmas party.

Comments

Calendar

Sun Mon Tue Wed Thu Fri Sat
  12345
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31   

Subscribe

Enter your email address to subscribe to this blog.

Tags

actionscript ajax blogging cfsnippets coldfusion flash forms flex misc model-glue off topic personal project learn slidesix sql

Recent Comments

More CF+Java: Compiling Classes And Persisting Objects
Getburl said: I have been attempting to get Db4o working in my CF application and I have not succeeded. I would lo... [More]

Thoughts On Ajax Frameworks And ColdFusion/Adobe
Erast said: http://fanniecollins.10gb... emo http://gracetrevino.phree...... [More]

Extending Ext With Ext Extensions
Erast said: http://fanniecollins.10gb... emo http://gracetrevino.phree...... [More]

CF Needs An Open Source Contact List Importer
Kay Smoljak said: Heh, the fact that sites DO it doesn't mean they SHOULD. To us it's ok, but to a non-tech-savvy user... [More]

A Few Project Updates
Helena said: Now punctually what is the situation ? [More]

RSS


coldfusionbloggers

FullAsAGoog MXNA

Consumed By Feed-Squirrel.com