ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   conbine cells into one column (https://www.excelbanter.com/excel-programming/377168-conbine-cells-into-one-column.html)

Greg

conbine cells into one column
 
Hi,

I have a database with 70 columns and need to get rid of rows with identical
information.

I just recored the following macro, but it is lenghthy + there is 256 char
limitation.

ActiveCell.FormulaR1C1 = "=RC[-70]&RC[-69]&RC[-68]&RC[-67] .... so on"

Is there is a way to do it differently?

Thank you
--
______
Regards,
Greg

Greg

conbine cells into one column
 
tried something like this, limiting to 255 char, not perfect but will do for
the time being

Dim form As String

n = 70
form = ""
For i = n To 1 Step -1

form = form & "&RC[-" & i & "]"

Next
form = "=left(" & Right(form, Len(form) - 1) & ",255)"

ActiveCell.FormulaR1C1 = form
--
______
Regards,
Greg


"Greg" wrote:

Hi,

I have a database with 70 columns and need to get rid of rows with identical
information.

I just recored the following macro, but it is lenghthy + there is 256 char
limitation.

ActiveCell.FormulaR1C1 = "=RC[-70]&RC[-69]&RC[-68]&RC[-67] .... so on"

Is there is a way to do it differently?

Thank you
--
______
Regards,
Greg



All times are GMT +1. The time now is 02:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com