transfer data? lookup?

  • Thread starter Thread starter GA85
  • Start date Start date
G

GA85

Suppose Sheet 1 looks like this:

1 2340 Cash Received Payment 2,000
3578 Accounts Pay Received Payment 2,000

2 4590 Expense Pd. Rent 9,000
2340 Cash Pd. Rent
9,000

Now, on Sheet 2 I want all of the information to be categorized by the
account number (ex. 2340)

How do I do this????
 
If I were you, I'd try to arrange these items into rows, using a space in a
row as an identifier:

Sub rearrange()

Dim curselection As Range
Dim i As Integer

Set curselection = Range("A1") 'or wherever you start

Do While curselection <> ""

If Not curselection.Offset(1, 0) = "" Then
i = 1
Do
curselection.Offset(1, 0).Copy Destination:=curselection.Offset(0, i)
curselection.Offset(1, 0).EntireRow.Delete
i = i + 1
Loop Until curselection.Offset(1, 0) = ""
End If

curselection.Offset(1, 0).EntireRow.Delete
Set curselection = curselection.Offset(1, 0)

Loop

End Sub

Then Select the entire range, and then sort according to...probably Column
B...


Regards,
Ryan---
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top