Loop to move column contents

XfortunaX

New Member
Joined
Aug 28, 2014
Messages
28
Hi!

I am currently stuck. I am attempting to create a loop that goes from the bottom of the range up in column F. If nothing is in the cell, move to the next row. If a cell in column F has content, moving the content from D, E, and F to the left. I was manually going into column C and delete Shift:=xlToLeft. I cannot get the loop to work.

From this:
CheckNumberRoutingNumberAccountNumberAmount2004004142-HSALESLLC
110621111111122222$2,390.313
11151111111122222$2,000.003
32191111111122222$166.643
9959301111111122222$5,630.893
1251241111111122222$1,374.063
5591451111111122 122-12222-001$800.003
42191111111122222$1,500.003

<tbody>
</tbody>

To this:
CheckNumberRoutingNumberAccountNumberAmount2004004142-HSALESLLC
110621111111122222$2,390.313
11151111111122222$2,000.003
32191111111122222$166.643
9959301111111122222$5,630.893
1251241111111122222$1,374.063
5591451111111 122-12222-001$800.003
42191111111122222$1,500.003

<tbody>
</tbody>

Thank you!
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
How about
Code:
Sub XfortunaX()
   Range("F2:F" & Rows.Count).SpecialCells(xlConstants).Offset(, -3).Delete xlToLeft
End Sub
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,728
Members
448,987
Latest member
marion_davis

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