Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel vba loop?
i have the following pivot table;
TagName 18-Feb 19-Feb PS001_Pump1.Daily_Runtime 4.20 3.90 PS001_Pump1.Daily_Starts 75 76 PS001_Pump2.Daily_Runtime 4.28 4.03 PS001_Pump2.Daily_Starts 74 76 what i would like to have it look like; TagName 18-Feb 19-Feb PS001_Pump1.Daily_Runtime 4.20 / 75 3.90 / 76 PS001_Pump2.Daily_Runtime 4.28 / 74 4.03 / 76 any ideas? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel vba loop?
Sub macro1()
Dim iRow As Integer Dim ws As Worksheet Set ws = Sheets("Sheet1") 'change columns and initial iRow to suit ws.Cells(1, 5) = ws.Cells(1, 1) ws.Cells(1, 6) = ws.Cells(1, 2) ws.Cells(1, 7) = ws.Cells(1, 3) iRow = 2 Do Until ws.Cells(iRow, 1) = "" ws.Cells(1 + iRow / 2, 5) = ws.Cells(iRow, 1) ws.Cells(1 + iRow / 2, 6) = ws.Cells(iRow, 2) & "/" & ws.Cells(1 + iRow, 2) ws.Cells(1 + iRow / 2, 7) = ws.Cells(iRow, 3) & "/" & ws.Cells(1 + iRow, 3) iRow = iRow + 2 Loop End Sub Hth, Merjet |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel vba loop?
In the source data, separate the pump identifier from the type of
information. then put the type of information is as one of your column fields. -- Regards, Tom Ogilvy "Mark J" wrote: i have the following pivot table; TagName 18-Feb 19-Feb PS001_Pump1.Daily_Runtime 4.20 3.90 PS001_Pump1.Daily_Starts 75 76 PS001_Pump2.Daily_Runtime 4.28 4.03 PS001_Pump2.Daily_Starts 74 76 what i would like to have it look like; TagName 18-Feb 19-Feb PS001_Pump1.Daily_Runtime 4.20 / 75 3.90 / 76 PS001_Pump2.Daily_Runtime 4.28 / 74 4.03 / 76 any ideas? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
For Each ... Next loop - need to reference the loop variable | Excel Programming | |||
Advancing outer Loop Based on criteria of inner loop | Excel Programming | |||
Loop Function unable to loop | Excel Programming | |||
Problem adding charts using Do-Loop Until loop | Excel Programming | |||
HELP!!!! Can't stop a loop (NOT an infinite loop) | Excel Programming |