Rearraging numbers so column c before is column a in next row

Fire7467

New Member
Joined
Jun 24, 2019
Messages
8
Rearranging numbers so column c before is column a in next row but also need it to but the last c row number in the next row if it applies
Pipe DTH03528DJ-0936Pipe DTH04898
Pipe DTH02677MLA-0435Pipe DTH03024
Pipe DTH05084DJ-0925Pipe DTH04298
Pipe DTH02033DJ-0261Pipe DTH03952
Pipe DTH03896MLA-0434Pipe DTH03528
Pipe DTH04291DJ-0922Pipe DTH03348
Pipe DTH02130MLA-0445Pipe DTH03824
Pipe DTH04898MLA-0433Pipe DTH03482
Pipe DTH04639MLA-0432Pipe DTH05084
Pipe DTH04292MLA-0446Pipe DTH03378
Pipe DTH03348MLA-0430Pipe DTH02881
Pipe DTH04171DJ-0263Pipe DTH03795
Pipe DTH03824DJ-0945Pipe DTH04908
Pipe DTH01743MLA-0183Pipe DTH04171

<colgroup><col><col span="2"></colgroup><tbody>
</tbody>


<tbody>
</tbody>
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Do you mean to place ALL of the current column C below the current column A but still leave it in place in column C as well...as it shows in your example?

Is there anything that goes into the new rows in either column B or C?

Code:
Sub MoveColC()
Dim LR As Long
LR = Cells(Rows.Count, "A").End(xlUp).Row
'assume header in row 1
'copy column C below existng column A
Range("C2:C" & LR).Copy Destination:=Range("A" & LR + 1)
End Sub
 
Last edited:
Upvote 0
Do you mean to place ALL of the current column C below the current column A but still leave it in place in column C as well...as it shows in your example?

Is there anything that goes into the new rows in either column B or C?



the rows need to stay the same about to look at the script
 
Upvote 0
sorry just got off, I need it to read like this
Pipe DTH03528DJ-0936Pipe DTH04898
Pipe DTH04898MLA-0433Pipe DTH03482
Pipe DTH05084DJ-0925Pipe DTH04298
Pipe DTH04298MLA-0431Pipe DTH04291
Pipe DTH04291DJ-0922Pipe DTH03348
Pipe DTH03348MLA-0430Pipe DTH02881
Pipe DTH02881DJ-0931Pipe DTH03553
Pipe DTH03553MLA-0429Pipe DTH04278
Pipe DTH04278DJ-0927Pipe DTH00645
Pipe DTH00645MLA-0428Pipe DTH04625
Pipe DTH04625DJ-0923Pipe DTH04213
Pipe DTH04213MLA-0427Pipe DTH02870
Pipe DTH02870DJ-0930Pipe DTH00903
Pipe DTH00903#N/A#N/A

<colgroup><col><col><col></colgroup><tbody>
</tbody>

not use to scripts on Excel was trying to use formulas but Im runing into a loop cause I need to cross verify and Im trying to use a true/false if this already in the column my formula is as follows ingore the 1s and 2s not sure what happened was saying true or false but think you get it

A=COUNTIF($F$1:$F$9996,B8) B-D is info Im trying to sort E=IFNA(H10,VLOOKUP(FALSE,$B$1:$F$10000,2,FALSE)) F=VLOOKUP(F8,welds!$B$1:welds!$C$10015,2,FALSE) G
TRUEPipe DTH03528DJ-0936Pipe DTH04898Pipe DTH03528DJ-0936Pipe DTH04898
TRUEPipe DTH02677MLA-0435Pipe DTH03024Pipe DTH04898MLA-0433Pipe DTH03482
2Pipe DTH05084DJ-0925Pipe DTH04298Pipe DTH05084DJ-0925Pipe DTH04298
1Pipe DTH02033DJ-0261Pipe DTH03952Pipe DTH04298MLA-0431Pipe DTH04291
1Pipe DTH03896MLA-0434Pipe DTH03528Pipe DTH04291DJ-0922Pipe DTH03348
2Pipe DTH04291DJ-0922Pipe DTH03348Pipe DTH03348MLA-0430Pipe DTH02881
1Pipe DTH02130MLA-0445Pipe DTH03824Pipe DTH02881DJ-0931Pipe DTH03553
2Pipe DTH04898MLA-0433Pipe DTH03482Pipe DTH03553MLA-0429Pipe DTH04278
1Pipe DTH04639MLA-0432Pipe DTH05084Pipe DTH04278DJ-0927Pipe DTH00645
1Pipe DTH04292MLA-0446Pipe DTH03378Pipe DTH00645MLA-0428Pipe DTH04625
2Pipe DTH03348MLA-0430Pipe DTH02881Pipe DTH04625DJ-0923Pipe DTH04213
1Pipe DTH04171DJ-0263Pipe DTH03795Pipe DTH04213MLA-0427Pipe DTH02870
1Pipe DTH03824DJ-0945Pipe DTH04908Pipe DTH02870DJ-0930Pipe DTH00903
1Pipe DTH01743MLA-0183Pipe DTH04171Pipe DTH00903#N/A#N/A

<colgroup><col><col><col span="3"><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
I'm afraid I still don't understand what you want...maybe provide more info while I continue to look at it.
 
Upvote 0
Trying to make a chain.. have random numbers associated together in rows in the row there is 3 columns the 1st column is the head asset the 3rd is behind so the next (2)row needs the 1st rows 3rd column in column 1 and the number associated with the row its in in the third column and so on to make a chain.. the chain is in pieces at the moment so there will be loose end but still need those the same way
 
Upvote 0
In post #4 , is the top table where it begins and the bottom table in that post is what you want to end up with?

The bottom table has Pipe DTH02677 but the top table doesn't have that anywhere. So, where did that come from?
 
Upvote 0
Didnt realized it but its not working was just manually doing it to show you but it should be there too
 
Upvote 0
It would help me if you gave me an possible input table and the result table you expect. Thanks.
 
Upvote 0

Forum statistics

Threads
1,214,823
Messages
6,121,780
Members
449,049
Latest member
greyangel23

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