Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is probably not a good solution because it relies on certain assumptions
and has no error routine. But, it might work and it was a fun puzzle. Try it & see what you think. Note that you set the value of cell G9 twice (doesnt make sense). Public Sub ProcStatusLogData() Dim wksLog As Worksheet Dim wksShell As Worksheet Dim lngRow As Long Application.ScreenUpdating = False Set wksLog = ThisWorkbook.Worksheets("Status Log Data") Set wksShell = ThisWorkbook.Worksheets("Shell") wksShell.Range("b2:b4").ClearContents wksShell.Range("a6:e6").ClearContents wksShell.Range("a9:i14").ClearContents For lngRow = 2 To wksLog.UsedRange.Rows.Count wksShell.Range("B3").Value = wksLog.Range("A" & lngRow).Value wksShell.Range("B2").Value = wksLog.Range("B" & lngRow).Value wksShell.Range("D6").Value = wksLog.Range("C" & lngRow).Value wksShell.Range("A6").Value = wksLog.Range("D" & lngRow).Value wksShell.Range("A9").Value = wksLog.Range("E" & lngRow).Value wksShell.Range("B9").Value = wksLog.Range("F" & lngRow).Value wksShell.Range("G9").Value = wksLog.Range("G" & lngRow).Value wksShell.Range("G9").Value = wksLog.Range("H" & lngRow).Value wksShell.Range("H9").Value = wksLog.Range("I" & lngRow).Value wksShell.Range("B4").Value = wksLog.Range("J" & lngRow).Value wksShell.Range("C6").Value = wksLog.Range("K" & lngRow).Value wksShell.Range("E6").Value = wksLog.Range("L" & lngRow).Value wksShell.Range("E9").Value = wksLog.Range("M" & lngRow).Value wksShell.Copy After:=Sheets("Shell") Sheets("Shell (2)").Name = Sheets("Shell (2)").Range("B2").Value Next lngRow Application.ScreenUpdating = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro - how to move to a specific cell and repeat | Excel Worksheet Functions | |||
I need to move the data from certain cells in multiple positions (different columns & rows) into a single row, then repeat. | Excel Programming | |||
How to move data from spreadsheets to spreadsheet? | Excel Discussion (Misc queries) | |||
cursor locked, won't allow move, repeat or formula edit | Excel Discussion (Misc queries) | |||
Macro to copy cells one row up then move down 4 rows & repeat | Excel Programming |