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!
 

Some videos you may like

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
46,210
Office Version
  1. 365
Platform
  1. Windows
How about
Code:
Sub XfortunaX()
   Range("F2:F" & Rows.Count).SpecialCells(xlConstants).Offset(, -3).Delete xlToLeft
End Sub
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
46,210
Office Version
  1. 365
Platform
  1. Windows
You're welcome & thanks for the feedback
 

Watch MrExcel Video

Forum statistics

Threads
1,108,817
Messages
5,525,070
Members
409,617
Latest member
Lenaf

This Week's Hot Topics

Top