Solved

Manipulate Data Quickly

Posted on 2016-11-23
2
42 Views
Last Modified: 2016-11-23
Hi, is there a quick way to manipulate data when it is in this sort of format? (see attached)

I have 7 workbooks where the data is spread out like this and I need to find a fast way to get the data into a tabular format. So basically 'name', 'phone', 'street' and 'suburb' are all column headings and the data falls below that.

Thanks
Troy
TAS-Dentists.xlsx
0
Comment
Question by:recycleaus
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 34

Accepted Solution

by:
Norie earned 500 total points
ID: 41899801
Troy

Give this a try.
Sub GoTabular()
Dim arrIn As Variant
Dim arrOut As Variant
Dim I As Long
Dim J As Long
Dim cnt As Long

    arrIn = Sheets("Sheet1").UsedRange.Columns(2)
    
    ReDim arrOut(1 To UBound(arrIn, 1) / 5, 1 To 4)

    For I = LBound(arrIn, 1) To UBound(arrIn, 1) Step 5
        cnt = cnt + 1
        For J = 1 To 4
            arrOut(cnt, J) = arrIn(I + J - 1, 1)
        Next J
    Next I
    
    Sheets.Add
    
    Range("A1:D1").Value = Array("Name", "Phone", "Street", "Suburb")
    
    Range("A2").Resize(UBound(arrOut, 1), UBound(arrOut, 2)).Value = arrOut
    
End Sub

Open in new window

0
 

Author Closing Comment

by:recycleaus
ID: 41899802
I found another solution myself in the end but thanks for the quick response.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question