• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 653
  • Last Modified:

Excel 2007 Move Cell With Text To Top Of Column


I get a raw data dump from another system and it generates a single cell of data, per column, which can appear anywhere starting in row 2 through row 200.  I need a code that will start in column A and look at all cells starting in row 2 through row 200.  Once a cell is identified that contains text, cut that cell and bring it up to row 2.  Then do the same for each column following through column BT.

I've attached a smaller version of my report which can be used for an example.  Sheet1 contains the before and Sheet 2 contains how it should look once this code is ran.

1 Solution
Saqib Husain, SyedEngineerCommented:
Sub move2row2()
Dim cel As Range, val As String
For Each cel In Range("A1:" & Range("A1").End(xlToRight).Address)
val = cel.End(xlDown).Value
cel.Offset(1) = val
Next cel
End Sub
EscanabaAuthor Commented:

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now