Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
dget and dsum
shift 1 shift 2 shift 3
1/1/2008 32 45 28 1/2/2008 49 36 73 1/3/2008 21 16 81 Have data as above and would like to make it as below: 1/1/2008 32 1/1/2008 45 1/1/2008 28 1/2/2008 49 1/2/2008 36 1/2/2008 73 Have 270 plus lines of data and have been trying to use dget but can't seem to get it to work |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
dget and dsum
Try this macro (create Sheet2 before running!):
Sub test() Dim sourcerng As Range, sourcecell As Range, oneRow As Range, destrng As Range Worksheets("Sheet1").Select NoofRows = Range("A" & Rows.Count).End(xlUp).Row Set sourcerng = Range("A2:A" & NoofRows) destrow = 2 For Each sourcecell In sourcerng Set oneRow = Range(Range("B" & sourcecell.Row), Range("D" & sourcecell.Row)) oneRow.Copy Worksheets("Sheet2").Select Set destrng = Worksheets("Sheet2").Range(Range("A" & destrow), Range("A" & destrow + 2)) destrng.Value = sourcecell.Value Range("B" & destrow).Select Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=True Worksheets("Sheet1").Select destrow = destrow + 3 Next sourcecell Application.CutCopyMode = False End Sub Regards, Stefi Henry ezt *rta: shift 1 shift 2 shift 3 1/1/2008 32 45 28 1/2/2008 49 36 73 1/3/2008 21 16 81 Have data as above and would like to make it as below: 1/1/2008 32 1/1/2008 45 1/1/2008 28 1/2/2008 49 1/2/2008 36 1/2/2008 73 Have 270 plus lines of data and have been trying to use dget but can't seem to get it to work |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
DGET/DSUM etc | Excel Worksheet Functions | |||
dget or dsum criteria | Excel Worksheet Functions | |||
dget or dsum? that is the question | Excel Discussion (Misc queries) | |||
dget or dsum? that is the question | Excel Discussion (Misc queries) | |||
using dget | Excel Worksheet Functions |