Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default macro needed for sorting txt in a ceratian manner

Hi,

I have records of customers with names and address info as below in an excel
sheet on column A:A:
=================
Name of Customer A
Adres of customerA

Name of Customer B
Adres of customerB
.....
....
...
Name of Customer XY
Adress of customer XY
=========================
The number of lines used for the address info may vary from one customer to
another. But there is at least one "empty" line between each customer. I
also don't know the exact number of customers...It's a long list.

I need to sort this list onto another sheet in the workbook, so that the
names will reside under column A and corresponding address info's on column
B.
  #2   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 9,221
Default macro needed for sorting txt in a ceratian manner

The number of lines used for the address info may vary from one customer
to
another.


If the above doesn't really apply,
i.e. the name / address data is in groups of 2 lines each,
viz. your illustration:

Name of Customer A
Adres of customerA

Name of Customer B
Adres of customerB


(the number of blank rows in-between groups doesn't matter, it can be
uneven)

then you may wish to try
: http://tinyurl.com/36qxl

for a workable non-macro solution

Your situation is 2 lines per group, so the formula in B2 would be:

: =INDIRECT("A"&2*ROW()-2+COLUMN()-2)

Copy B2 across to C2, then copy down until zeros appear

Copy Paste special values on another sheet
(to freeze the values in cols B & C)

--
Rgds
Max
xl 97
----------------------------------
Use xdemechanik <atyahoo<dotcom for email
-----------------------------------------
"Martyn" wrote in message
...
Hi,

I have records of customers with names and address info as below in an

excel
sheet on column A:A:
=================
Name of Customer A
Adres of customerA

Name of Customer B
Adres of customerB
....
...
..
Name of Customer XY
Adress of customer XY
=========================
The number of lines used for the address info may vary from one customer

to
another. But there is at least one "empty" line between each customer. I
also don't know the exact number of customers...It's a long list.

I need to sort this list onto another sheet in the workbook, so that the
names will reside under column A and corresponding address info's on

column
B.

The output should look like this:

1 Customer A Adress of customer A
2 Customer B Address of customer B
....
..
N Customer N Address of customer N

Could anyone suggest a macro solution for this situation?
Thanks

Martyn



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
Sorting and coloring cells, formula or macro help needed domyrat Excel Discussion (Misc queries) 5 April 4th 10 03:18 PM
Chart For Every Row In Short Period/Easy Manner FARAZ QURESHI Charts and Charting in Excel 1 February 21st 09 10:21 PM
Formula or macro needed for sorting complex data issue. malycom Excel Discussion (Misc queries) 4 November 27th 08 07:24 AM
Excel Macro to Modify Multiple Worksheets in the Same Manner [email protected] Excel Discussion (Misc queries) 1 February 16th 08 12:34 AM
comapre two list of data & arranging in a same manner Sachin New Users to Excel 1 November 25th 06 01:28 PM


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