Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
move contents of column C based on criteria related to column A
After exporting a MSProject gantt chart into excel, I need to move/copy
contents of column c (Task) into columns to the right based on Outline Level in column A. Example: Outline Level=1 in column D/L1, Outline Level=2 in column E/L2. I wrote an IF statement to do this but the text copied into the L1-8 columns cuts off because the columns are not very wide and there are formulas in each. "Outline Level" ID Task L1 L2 L3 L4 L5 L6 L7 L8 1 1078 Test 2 3487 Input 3 8873 IT work 4 8737 Enhance 5 3483 Train 6 7483 Review 7 8473 Reallocate 8 7483 Finished |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
move contents of column C based on criteria related to column A
Can't you just widen the columns?
If you can put formulas in D2 to K2, you can try this: In D2: =if($a2=column()-3,$c2,"") and drag across to column K Then select D2:K2 and drag down as far as you need. Debra wrote: After exporting a MSProject gantt chart into excel, I need to move/copy contents of column c (Task) into columns to the right based on Outline Level in column A. Example: Outline Level=1 in column D/L1, Outline Level=2 in column E/L2. I wrote an IF statement to do this but the text copied into the L1-8 columns cuts off because the columns are not very wide and there are formulas in each. "Outline Level" ID Task L1 L2 L3 L4 L5 L6 L7 L8 1 1078 Test 2 3487 Input 3 8873 IT work 4 8737 Enhance 5 3483 Train 6 7483 Review 7 8473 Reallocate 8 7483 Finished -- Dave Peterson |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
move contents of column C based on criteria related to column
We have been manually sorting by Outline Level and cutting and pasting 1's in
col D, 2's in col E, etc. By moving the data the text in a cell "lays over" the empty cells. This keeps the spreadsheet a manageable size. I think I need a macro similar to the one shown below, except it should move column C based on the number specified in col A (Outline Level) which is 1-8. Sub test() Dim from_cells_count As Long Dim i As Long Dim row_num As Long Dim col_num As Long from_cells_count = (Range("A" & Rows.Count).End(xlUp).Row) For i = 1 To from_cells_count If Int(i / 7) < i / 7 Then row_num = Int(i / 7) + 1 col_num = (i Mod 7) + 1 Else row_num = i / 7 col_num = 8 End If Cells(row_num, col_num) = Range("A" & i) Next i End Sub "Dave Peterson" wrote: Can't you just widen the columns? If you can put formulas in D2 to K2, you can try this: In D2: =if($a2=column()-3,$c2,"") and drag across to column K Then select D2:K2 and drag down as far as you need. Debra wrote: After exporting a MSProject gantt chart into excel, I need to move/copy contents of column c (Task) into columns to the right based on Outline Level in column A. Example: Outline Level=1 in column D/L1, Outline Level=2 in column E/L2. I wrote an IF statement to do this but the text copied into the L1-8 columns cuts off because the columns are not very wide and there are formulas in each. "Outline Level" ID Task L1 L2 L3 L4 L5 L6 L7 L8 1 1078 Test 2 3487 Input 3 8873 IT work 4 8737 Enhance 5 3483 Train 6 7483 Review 7 8473 Reallocate 8 7483 Finished -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Locate max value of one column based on criteria in another colum | Excel Worksheet Functions | |||
Move column to in-between existing columns | Excel Discussion (Misc queries) | |||
Counting & Summing based on criteria on another column | Excel Discussion (Misc queries) | |||
Identify the contents of column in a filtered range | Excel Worksheet Functions | |||
Return Count for LAST NonBlank Cell in each Row | Excel Worksheet Functions |