Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default rearranging data


I've got a database with a ID--such as TC38493--in column A, but not in
every row. Instead its the ID followed by more information about that
ID. And the information is contained in more then one cells in the rows
below it. Unfortunately the number of rows of information is not a
regular amount, sometimes its 2 sometimes is 7 rows.

TC389214
Information Information Information
Information Information Information
Information Information Information
TC298315
Information Information Information
Information Information Information
Information Information Information
Information Information Information
Information Information Information
TC073847
Information Information Information
Information Information Information

Then in my second document I've got a lot of these IDs listed. I need
to search Document1 with the ID from Document2 and when it finds
anything it will paste all of the information--whether its 2 rows or
7--back in document2.
Anyone want to write me a program, or at least start me off? I know
the very basics of VBA. If you'd like more information just ask.


--
Taru
------------------------------------------------------------------------
Taru's Profile: http://www.excelforum.com/member.php...o&userid=35494
View this thread: http://www.excelforum.com/showthread...hreadid=553229

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default rearranging data


could someone at least tell me if it would be easier to make a progra
that would put all the information in one row, then make a find an
paste program. Or would it be easier to just make one big program?

Also what exactly is the command to paste something, that whol
proccess confuses me

--
Tar
-----------------------------------------------------------------------
Taru's Profile: http://www.excelforum.com/member.php...fo&userid=3549
View this thread: http://www.excelforum.com/showthread.php?threadid=55322

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default rearranging data


Ok, someone at least help me with this part.

I want to move the Information all into the same row as the ID. So I
want this

ID
Information Information Information

to look like this

ID Information Information Information

Some usefull characteristics is that all of the IDs start with this ''
and all of the information starts with 'GO:' also the information in
each row is form column A to column G. Someone please help, if I can
consolodate all of the information into the same row as its ID then I
can do what I need.


--
Taru
------------------------------------------------------------------------
Taru's Profile: http://www.excelforum.com/member.php...o&userid=35494
View this thread: http://www.excelforum.com/showthread...hreadid=553229

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default rearranging data


Friday this forum was really good to me, is there no one on here on
Monday? Comeon, I need some help here guys.


--
Taru
------------------------------------------------------------------------
Taru's Profile: http://www.excelforum.com/member.php...o&userid=35494
View this thread: http://www.excelforum.com/showthread...hreadid=553229

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 145
Default rearranging data

Try this (part only)

Sub t()
Dim rng As Range
Dim c As Range

lastrow = Cells(Rows.Count, 1).End(xlUp).Row
For i = lastrow To 1 Step -1

If Left(Cells(i, 1), 2) = "TC" Then
Debug.Print i, lastrow
Set rng = Range(Cells(i + 1, 1), Cells(lastrow, 3))
j = 0
For Each c In rng
j = j + 1
Cells(i, j + 1) = c
Next c
lastrow = i - 1
End If

Next i
End Sub

"Taru" wrote in message
...

I've got a database with a ID--such as TC38493--in column A, but not in
every row. Instead its the ID followed by more information about that
ID. And the information is contained in more then one cells in the rows
below it. Unfortunately the number of rows of information is not a
regular amount, sometimes its 2 sometimes is 7 rows.

TC389214
Information Information Information
Information Information Information
Information Information Information
TC298315
Information Information Information
Information Information Information
Information Information Information
Information Information Information
Information Information Information
TC073847
Information Information Information
Information Information Information

Then in my second document I've got a lot of these IDs listed. I need
to search Document1 with the ID from Document2 and when it finds
anything it will paste all of the information--whether its 2 rows or
7--back in document2.
Anyone want to write me a program, or at least start me off? I know
the very basics of VBA. If you'd like more information just ask.


--
Taru
------------------------------------------------------------------------
Taru's Profile:

http://www.excelforum.com/member.php...o&userid=35494
View this thread: http://www.excelforum.com/showthread...hreadid=553229





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rearranging data RA Excel Discussion (Misc queries) 3 June 5th 09 07:11 PM
Rearranging DATA raj74 Excel Discussion (Misc queries) 6 April 12th 09 12:11 PM
Rearranging data Witold Excel Discussion (Misc queries) 6 May 15th 07 02:54 PM
Rearranging Data Help... Jambruins Excel Discussion (Misc queries) 0 February 22nd 05 03:31 PM
rearranging data Mark Roach Excel Programming 9 December 20th 04 03:14 PM


All times are GMT +1. The time now is 08:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"