Concatenate multiple rows then move to next column

pbt

Well-known Member
Joined
Oct 18, 2005
Messages
1,613
I'm having trouble with this. I've tried searching but can't find anything that helps.

This is the current code I have:
Code:
With Sheets("Crew 4")
        ' determine the end-of-data col
        i = .Cells(4, .Columns.Count).End(xlToLeft).Column
        If i < 2 Then
            MsgBox "No data on CREW sheet."
            GoTo Xit
        End If
        ' insert a temporary column
        .Columns("A:A").Insert Shift:=xlToRight
        
        With .Range("A4:A" & i)
            ' seed formula in A4-down than concatenate the Job+Lot+(Phase+Code)
            .FormulaR1C1 = "=R4C4&"":""&R5C4&"":""&R7C4&R8C4"

This is my Data layout:


Excel 2010
BDEFG
4Job NumberDRRC15013DRRC15013DRRC15013DRRC15013
5Lot #31313131
6Model / Elev.1839183918391839
7PhaseSCLHLHLH
8Code10103080
9Budget18.00631.00203.0031.00
Crew 4


What I am trying to do, starting in Col D, Concat. Rows 4, 5,7, & 8 into the newly inserted Col A4 then move down to A5 and do the same thing with Col E, etc. etc. to the end of the Variable i which was set to Col 17 prior to the insertion of row A.

This is the results I get currently in Col A:


Excel 2010
A
4DRRC15013:31:SC10
5DRRC15013:31:SC10
6DRRC15013:31:SC10
7DRRC15013:31:SC10
Crew 4


It gives the same value as col D, as you can see.
I'm only showing four rows but Col A has only 14 entries all the same, not 17 entries.

I need help so A5 reads Col E, A6 reads Col F, etc.

(Col C hidden sensitive info)

Thanks in advance.
 
Last edited:

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Forum statistics

Threads
1,214,413
Messages
6,119,372
Members
448,888
Latest member
Arle8907

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top