Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In my spreadsheet I have several instances of a title
followed by related cells (maybe 1 , 2 or more) of data. I want to take the cells of data and put them into the cell immediately to the right of this title. e.g. Cell "A10" contains "Title". Cell "A11" contains "text 1" Cell "A12" contains "text 2" Cell "A13" contains "text 3" I want cell "B10" to contain "text 1 text 2 text 3". Cell "A10" remains unchanged. Cells A11, A12 and A13 are to be deleted. How do i do this? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One question before this can be answered........
Since you say that there can be a varying number of entries following a title, how do you determine which is a title and which is not? Cheers Nigel "Eric" wrote in message ... In my spreadsheet I have several instances of a title followed by related cells (maybe 1 , 2 or more) of data. I want to take the cells of data and put them into the cell immediately to the right of this title. e.g. Cell "A10" contains "Title". Cell "A11" contains "text 1" Cell "A12" contains "text 2" Cell "A13" contains "text 3" I want cell "B10" to contain "text 1 text 2 text 3". Cell "A10" remains unchanged. Cells A11, A12 and A13 are to be deleted. How do i do this? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub ReArrangeTable()
Range("A1").CurrentRegion.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:= _ xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Dim lastrow As Long Dim cellvalue As String lastrow = Range("A65000").End(xlUp).Row For lastrow = lastrow To 2 Step -1 If Cells(lastrow - 1, 1) = Cells(lastrow, 1) Then Range(Cells(lastrow, 2), _ Cells(lastrow, 200).End(xlToLeft)).Copy Cells(lastrow - 1, 200).End(xlToLeft).Offset (0, 1).PasteSpecial xlValue Rows(lastrow).Delete End If Next End Sub -----Original Message----- In my spreadsheet I have several instances of a title followed by related cells (maybe 1 , 2 or more) of data. I want to take the cells of data and put them into the cell immediately to the right of this title. e.g. Cell "A10" contains "Title". Cell "A11" contains "text 1" Cell "A12" contains "text 2" Cell "A13" contains "text 3" I want cell "B10" to contain "text 1 text 2 text 3". Cell "A10" remains unchanged. Cells A11, A12 and A13 are to be deleted. How do i do this? . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Combining data from 2 cells into 1 cell | Excel Discussion (Misc queries) | |||
Combining data from multiple cells into one cell with commas | Excel Discussion (Misc queries) | |||
Combining data from different cells and more... | Excel Worksheet Functions | |||
Combining data from multiple cells into one cell. | Excel Worksheet Functions | |||
Combining data (numeric format) in multiple cells into one cell (t | Excel Discussion (Misc queries) |