Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default transfer data between sheets

Hi

I tried looking at the archives but haven't really come across a
similar problem.

In one sheet the data is organised as follows:
Firm 12/5/05 12/6/05 12/7/05 12/8/05
A Event-1 Event-4
B
C Event-3 Event-5
D Event-2
E Event-7

On another sheet this data needs to be organised as follows:

12/5/05
A Event-1
D Event-2
12/6/05
C Event-3
12/7/05
A Event-4
12/8/05
C Event-5
E Event-7

Would appreciate if some one could suggest a way to do this.

Thanks
Utkarsh

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default transfer data between sheets

Option Explicit

Sub re_organise()

Dim index As Long 'target
Dim thisDate As String
Dim lastRow As Long
Dim HeaderRow As Long
Dim thisCol As Long 'column loop count
Dim thisRow As Long 'row loop count

'initialise
HeaderRow = 3 ' Firm as top left cell on my sheet
lastRow = Cells(HeaderRow, 1).End(xlDown).Row
index = lastRow + 3 ' set first line for output below table
thisCol = 2
thisDate = Cells(HeaderRow, thisCol)

Do Until thisDate = ""
index = index + 1
Cells(index, 1) = thisDate
For thisRow = HeaderRow + 1 To lastRow
If Cells(thisRow, thisCol) < "" Then
index = index + 1
Cells(index, 1) = Cells(thisRow, 1)
Cells(index, 2) = Cells(thisRow, thisCol)
End If
Next
thisCol = thisCol + 1
thisDate = Cells(HeaderRow, thisCol)
Loop

End Sub


" wrote:

Hi

I tried looking at the archives but haven't really come across a
similar problem.

In one sheet the data is organised as follows:
Firm 12/5/05 12/6/05 12/7/05 12/8/05
A Event-1 Event-4
B
C Event-3 Event-5
D Event-2
E Event-7

On another sheet this data needs to be organised as follows:

12/5/05
A Event-1
D Event-2
12/6/05
C Event-3
12/7/05
A Event-4
12/8/05
C Event-5
E Event-7

Would appreciate if some one could suggest a way to do this.

Thanks
Utkarsh


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default transfer data between sheets

Thanks so much. It works beautifully!

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
conditional data transfer from multiple sheets James Excel Discussion (Misc queries) 0 February 13th 09 06:55 PM
Transfer data back and forth between sheets Psycho Monkey Excel Discussion (Misc queries) 3 October 22nd 08 09:04 PM
How do I transfer data from multiple sheets to one without pasting sdale Excel Worksheet Functions 0 October 7th 06 01:10 AM
transfer data in excel between sheets Data Transfer betwen Excel Sheets Excel Discussion (Misc queries) 1 June 20th 05 05:20 PM
How do I transfer data between Excell sheets? Grafur Excel Worksheet Functions 2 February 19th 05 03:08 AM


All times are GMT +1. The time now is 02:45 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"