Results 1 to 5 of 5

To move Data rows to columns against one cell so can write separate SQL insert statments

Threaded View

  1. #1
    Registered User
    Join Date
    03-14-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    4

    Smile To move Data rows to columns against one cell so can write separate SQL insert statments

    I have scoured the web to move data from a row
    ie

    name no1 no2 no3 no4 ...no8
    . . . . .
    . . . . .
    . . . . .
    to
    name no1
    name no2
    name no3

    So then you can write SQL inserts against each line and insert into a database.

    On this forum I have seen to go from columns to rows but not the other way round!

    I learnt some VBA from excel pratique site and wrote the vba script to do it. Never done VBA before this but hit the fustration of developing which is why I dont like coding.
    Had to use 4 counters and solve some sequence math. As you have to count in 8s for the columns.

    If anyone has a better easier to do this then please advise.Samplenamesnumbersrowsforexcelforum.xlsx

    Have attached a sample spreadsheet, obviously I have modified the numbers and names to protect privacy.
    Last edited by hadster016; 03-18-2014 at 09:48 AM. Reason: marking solved

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 10-22-2013, 06:01 AM
  2. Replies: 7
    Last Post: 07-19-2013, 10:55 AM
  3. [SOLVED] How to separate cell values and insert into new rows
    By dj7616 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-22-2013, 09:10 PM
  4. Replies: 7
    Last Post: 09-07-2011, 02:30 PM
  5. Help! Need to move rows to separate worksheet if cell values match a value in range
    By nzamparo in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-25-2011, 12:20 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1