Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default Creating new entries

Hi,
Data from Sheet1 - starting in col A, Row 2 - is copied to Sheet2:


HTH

Sub Transform()

Dim ws1 As Worksheet, ws2 As Worksheet
Dim lastrow As Long, r As Long, i As Integer

Set ws1 = Worksheets("sheet1")
Set ws2 = Worksheets("sheet2")

rr = 2
ws2.Range("A1:B1") = Array("Student", "Grade")
With ws1
For r = 2 To .Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To .Cells(r, Columns.Count).End(xlToLeft).Column
.Cells(r, 1).Copy ws2.Cells(rr, 1)
.Cells(r, i).Copy ws2.Cells(rr, 2)
rr = rr + 1
Next i
Next r
End With

End Sub

"eclipse" wrote:

Hi All,

I have a spreadsheet containing students' grades in this format:

M Wakefield A C D
A Sky F E B


What I would like to generate from the data above is this:


M Wakefield A
M Wakefield C
M Wakefield D
A Sky F
A Sky E
A Sky B



I have about 2000 entries, any help will be much appreciated.



Terapixels



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a drop down list with a multitude of entries selected run2live Excel Worksheet Functions 1 January 26th 09 08:59 AM
creating a combo box that shows multiple entries. Burke Excel Worksheet Functions 1 May 19th 08 07:27 PM
creating a history of entries dhcv Excel Discussion (Misc queries) 0 March 21st 07 02:43 PM
Creating Entries Automatically from Variables zimbound Excel Discussion (Misc queries) 3 July 21st 06 03:43 AM
Searching a list with repeat entries and creating a sum Brian Connolly Excel Discussion (Misc queries) 1 February 3rd 05 09:41 PM


All times are GMT +1. The time now is 01:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"