LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default CONCATENATE

Hi all!

....this is not so elegand, but works correctly!

Follow the 8 steps above:

1
Type: =(A5&REPT("/";AND(LEN(A5)))) in cell "AE5".
2
Fill right the next 30 columns.
3
Fill down the rows you want.
4
Type:
=AE5&AF5&AG5&AH5&AI5&AJ5&AK5&AL5&AM5&AN5&AO5&AP5&A Q5&AR5&AS5
&AT5&AU5&AV5&AW5&AX5&AY5&AZ5&BA5&BB5&BC5&BD5&BE5&B F5&BG5&BH5
in "BI5".
5
Fill down.
6
Type: =IF(LEN(BI5);LEFT(BI5;LEN(BI5)-1);"") in "BJ5"
7
Fill down.
8
Hide columns "AE:BI"

Sorry for my English :-)
John


Ο χρήστης "Gary Keramidas" *γγραψε:

give this a try, just comment the msgbox line and uncomment the line after to
place it in the same row in column AE.
ia also used sheet1, so change the name if you need to.

Sub test()
Dim ws As Worksheet
Dim lastrow As Long
Dim lastcol As Long
Dim i As Long
Dim x As Long
Dim sStr As String
Set ws = Worksheets("Sheet1")
lastrow = ws.Cells(Rows.Count, "A").End(xlUp).Row
lastcol = ws.Cells(1, Columns.Count).End(xlToLeft).Column

For x = 1 To lastrow
With ws
For i = 1 To lastcol
With .Cells(x, i)
If .Value < "" Then
If sStr = "" Then
sStr = .Value
Else
sStr = sStr & "/" & .Value
End If
End If
End With
Next
End With
MsgBox sStr
' ws.Range("AE" & x).Value = sStr
sStr = ""
Next
End Sub


--


Gary


wrote in message
...
Hi,
I have a file that from Column A to AD and Rows 5 to 98 has formulas
that is linked to a data in different worksheet, some cells are only
numbers and some have text and numbers and some are blank, I am trying
to "CONCATENATE" each row to a cell with a "/" in between but it
should leave out the blank cells.
I would appreciate for any help.
Thanks,




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Concatenate Sena Excel Discussion (Misc queries) 1 September 9th 07 02:44 PM
Concatenate help Igneshwara reddy[_2_] Excel Worksheet Functions 7 August 30th 07 12:15 AM
Concatenate Helpless1 Excel Programming 18 July 13th 06 05:10 PM
Concatenate Jeff Excel Discussion (Misc queries) 4 October 5th 05 04:39 PM
I know how to concatenate ,can one de-concatenate to split date? QUICK BOOKS PROBLEM- New Users to Excel 1 July 26th 05 05:07 PM


All times are GMT +1. The time now is 08:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright 2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"