Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I need help returning data to consecutive columns to the right from rows
below until a certain text string is found in the first column (I'm having trouble explaining this, hopefully the example will make sense). Column B of my sheet has either the text strings "NEW Transaction" or "Additional Data", and there is data in column C. I need to return all the data in column C that occurs in rows below the string "NEW Transaction" to adjacent columns in the same row as this text string "NEW Transaction" until there is another value of "NEW Transaction" in column B. Example: Current B C D E NEW Transaction 1.1 Additional Data 1.5 Additional Data 1.6 NEW Transaction 1.3 NEW Transaction 1.4 Additional Data 1.2 Desired B C D E NEW Transaction 1.1 1.5 1.6 Additional Data 1.5 Additional Data 1.6 NEW Transaction 1.3 NEW Transaction 1.4 1.2 Additional Data 1.2 I am using Excel 2007. Thanks for any help. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Sub movedata()
RowCount = 1 Do While Range("B" & RowCount) < "" If Range("B" & RowCount) = "NEW Transaction" Then Start = RowCount ColCount = 4 Else Cells(Start, ColCount) = Range("C" & RowCount) ColCount = ColCount + 1 End If RowCount = RowCount + 1 Loop End Sub "bwilk77" wrote: I need help returning data to consecutive columns to the right from rows below until a certain text string is found in the first column (I'm having trouble explaining this, hopefully the example will make sense). Column B of my sheet has either the text strings "NEW Transaction" or "Additional Data", and there is data in column C. I need to return all the data in column C that occurs in rows below the string "NEW Transaction" to adjacent columns in the same row as this text string "NEW Transaction" until there is another value of "NEW Transaction" in column B. Example: Current B C D E NEW Transaction 1.1 Additional Data 1.5 Additional Data 1.6 NEW Transaction 1.3 NEW Transaction 1.4 Additional Data 1.2 Desired B C D E NEW Transaction 1.1 1.5 1.6 Additional Data 1.5 Additional Data 1.6 NEW Transaction 1.3 NEW Transaction 1.4 1.2 Additional Data 1.2 I am using Excel 2007. Thanks for any help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Search range of cells for word & return value for use in formula? | Excel Worksheet Functions | |||
Stop a loop when certain data is found | Excel Discussion (Misc queries) | |||
Vlookup, return zero if not found | Excel Worksheet Functions | |||
can lookup return err if no match found | Excel Worksheet Functions | |||
Return text found in a search | Excel Worksheet Functions |