Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
daarun
 
Posts: n/a
Default Merging columns


Hi all,

I have got 3 columns with the column headings as follows

Column : A B C


Firstname Fathersname Mothersname

Jim Jack Mary
Raj
Rani
Susan John Diana

The desired output is given below

Column D E
Jim Jack
Jim Mary
Raj Rani
Susan John
Susan Diana

The logic should be in case if a person has father & mother then he
should have 2 rows in the output, if not he would have only one row in
the resulting set.

Do let me know how do i do this, i have got 500 such records to
update.

3 Cheers
Arun


--
daarun
------------------------------------------------------------------------
daarun's Profile: http://www.excelforum.com/member.php...o&userid=28954
View this thread: http://www.excelforum.com/showthread...hreadid=486827

  #2   Report Post  
Posted to microsoft.public.excel.newusers
Bernie Deitrick
 
Posts: n/a
Default Merging columns

Assuming that your data starts with the headers in row 1 and are in columns A to C:

In cell D2, use the formula
=A2
In cell E2, use the formula
=B2
In cell F2, use the formula
=ROW()
In cell G2, use the formula
=IF(C2<"",A2,"")
In cell H2, use the formula
=C2
In cell I2, use the formula
=IF*C2<"",ROW(),"")

Then copy those six formulas down to match your 500 or so rows.

Then copy columns D:I, paste special values. Then select the used cells in columns G, H and I, cut
them, and paste them below the data in columns D, E and F. Then select Columns D, E and F, and sort
based on column D, then reselect to get rid of the blanks, and resort on column F.

HTH,
Bernie
MS Excel MVP


"daarun" wrote in message
...

Hi all,

I have got 3 columns with the column headings as follows

Column : A B C


Firstname Fathersname Mothersname

Jim Jack Mary
Raj
Rani
Susan John Diana

The desired output is given below

Column D E
Jim Jack
Jim Mary
Raj Rani
Susan John
Susan Diana

The logic should be in case if a person has father & mother then he
should have 2 rows in the output, if not he would have only one row in
the resulting set.

Do let me know how do i do this, i have got 500 such records to
update.

3 Cheers
Arun


--
daarun
------------------------------------------------------------------------
daarun's Profile: http://www.excelforum.com/member.php...o&userid=28954
View this thread: http://www.excelforum.com/showthread...hreadid=486827



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
how to combine several columns into a single column jims Excel Discussion (Misc queries) 9 August 15th 05 12:00 PM
merging text columns [email protected] Excel Discussion (Misc queries) 8 July 31st 05 09:19 PM
WRAP a text line over several columns without merging cells Conrad S Excel Worksheet Functions 1 March 22nd 05 03:52 AM
Merging columns of data Frank D. Nicodem, Jr. Excel Discussion (Misc queries) 0 March 4th 05 08:16 PM
Counting the Contents of Two Columns Molochi Excel Discussion (Misc queries) 6 December 22nd 04 08:13 PM


All times are GMT +1. The time now is 05:20 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"