Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Stu-Gnu
 
Posts: n/a
Default Moving selected data

I have the following type of raw data:

Member No. Date Type Value
50772 28/02/2005 Unit A 480
50772 28/02/2005 Unit B 875
50772 02/03/2005 Unit A 109
66221 28/02/2005 Unit B 390
77344 28/02/2005 Unit A 133
77344 03/03/2005 Unit A 600
77344 03/03/2005 Unit B 82

I need to rearrange it so that 'A' and 'B' Unit Types appear in the same
row, where the Member no. and the Date are the same, otherwise, they remain
in seperate rows. The result should look as follows:

Member No. Date Unit A Unit B
50772 28/02/2005 480 875
50772 02/03/2005 109
66221 28/02/2005 390
77344 28/02/2005 133
77344 03/03/2005 600 82

Any suggestions as to the easiest way of doing this would be appreciated.
  #2   Report Post  
Max
 
Posts: n/a
Default

... easiest way of doing this

A Pivot Table would bring you very close in a matter of clicks & drags ..

Assuming this data below is in Sheet1

Member No. Date Type Value
50772 28/02/2005 Unit A 480
50772 28/02/2005 Unit B 875
50772 02/03/2005 Unit A 109
66221 28/02/2005 Unit B 390
77344 28/02/2005 Unit A 133
77344 03/03/2005 Unit A 600
77344 03/03/2005 Unit B 82


Click anywhere within the data

Click Data Pivot Table Report Next Next

In step 3 of the wizard:
drag Member No and drop within ROW area
drag Date and drop within ROW area (below Member No)
drag Type and drop within COLUMN area
drag Value and drop within DATA area
(it'll appear as Sum of Value)

Double-click on Member No
Select None under Subtotals OK

Click Finish

The Pivot Table (PT) will appear
in a new sheet to the left of Sheet1

In the PT:

Right-click on the vertical "Grand Total" label Delete
Right-click on the horiz "Grand Total" label Delete
(you could of course, retain the 2 Grand Totals <g)

and what you'll get remaining is essentially:

Member No. Date Unit A Unit B
50772 28/02/2005 480 875
50772 02/03/2005 109
66221 28/02/2005 390
77344 28/02/2005 133
77344 03/03/2005 600 82


There ... with some deft mouse control / touches,
you should be able to create the PT in under 30 secs <g

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Stu-Gnu" wrote in message
...
I have the following type of raw data:

Member No. Date Type Value
50772 28/02/2005 Unit A 480
50772 28/02/2005 Unit B 875
50772 02/03/2005 Unit A 109
66221 28/02/2005 Unit B 390
77344 28/02/2005 Unit A 133
77344 03/03/2005 Unit A 600
77344 03/03/2005 Unit B 82

I need to rearrange it so that 'A' and 'B' Unit Types appear in the same
row, where the Member no. and the Date are the same, otherwise, they

remain
in seperate rows. The result should look as follows:

Member No. Date Unit A Unit B
50772 28/02/2005 480 875
50772 02/03/2005 109
66221 28/02/2005 390
77344 28/02/2005 133
77344 03/03/2005 600 82

Any suggestions as to the easiest way of doing this would be appreciated.



  #3   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Max,

An additional couple of steps after you have produced the pivot table will
give you the exact table you want:

Select the entire pivot table, use Copy, then paste somewhere else as
values. Then select just the first column of the new values table, and use
Edit | Go To.. Special, Blanks, OK. Then type an = sign, hit the up arrow
once, and press Ctrl-Enter. This will fill in the blank cells of the first
column with the proper values. Then Copy and pastespecial values again to
get rid of the formulas in that column, and you're done.

HTH,
Bernie
MS Excel MVP

"Max" wrote in message
...
... easiest way of doing this


A Pivot Table would bring you very close in a matter of clicks & drags ..

Assuming this data below is in Sheet1

Member No. Date Type Value
50772 28/02/2005 Unit A 480
50772 28/02/2005 Unit B 875
50772 02/03/2005 Unit A 109
66221 28/02/2005 Unit B 390
77344 28/02/2005 Unit A 133
77344 03/03/2005 Unit A 600
77344 03/03/2005 Unit B 82


Click anywhere within the data

Click Data Pivot Table Report Next Next

In step 3 of the wizard:
drag Member No and drop within ROW area
drag Date and drop within ROW area (below Member No)
drag Type and drop within COLUMN area
drag Value and drop within DATA area
(it'll appear as Sum of Value)

Double-click on Member No
Select None under Subtotals OK

Click Finish

The Pivot Table (PT) will appear
in a new sheet to the left of Sheet1

In the PT:

Right-click on the vertical "Grand Total" label Delete
Right-click on the horiz "Grand Total" label Delete
(you could of course, retain the 2 Grand Totals <g)

and what you'll get remaining is essentially:

Member No. Date Unit A Unit B
50772 28/02/2005 480 875
50772 02/03/2005 109
66221 28/02/2005 390
77344 28/02/2005 133
77344 03/03/2005 600 82


There ... with some deft mouse control / touches,
you should be able to create the PT in under 30 secs <g

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Stu-Gnu" wrote in message
...
I have the following type of raw data:

Member No. Date Type Value
50772 28/02/2005 Unit A 480
50772 28/02/2005 Unit B 875
50772 02/03/2005 Unit A 109
66221 28/02/2005 Unit B 390
77344 28/02/2005 Unit A 133
77344 03/03/2005 Unit A 600
77344 03/03/2005 Unit B 82

I need to rearrange it so that 'A' and 'B' Unit Types appear in the same
row, where the Member no. and the Date are the same, otherwise, they

remain
in seperate rows. The result should look as follows:

Member No. Date Unit A Unit B
50772 28/02/2005 480 875
50772 02/03/2005 109
66221 28/02/2005 390
77344 28/02/2005 133
77344 03/03/2005 600 82

Any suggestions as to the easiest way of doing this would be

appreciated.




  #4   Report Post  
Stu-Gnu
 
Posts: n/a
Default

Thanks Max - I hadn't thought of using a PT. The only problem I have
encountered is that using Sum of Value in the DATA area shows zeros and i
can't get it to show the appropriate values.

"Max" wrote:

... easiest way of doing this


A Pivot Table would bring you very close in a matter of clicks & drags ..

Assuming this data below is in Sheet1

Member No. Date Type Value
50772 28/02/2005 Unit A 480
50772 28/02/2005 Unit B 875
50772 02/03/2005 Unit A 109
66221 28/02/2005 Unit B 390
77344 28/02/2005 Unit A 133
77344 03/03/2005 Unit A 600
77344 03/03/2005 Unit B 82


Click anywhere within the data

Click Data Pivot Table Report Next Next

In step 3 of the wizard:
drag Member No and drop within ROW area
drag Date and drop within ROW area (below Member No)
drag Type and drop within COLUMN area
drag Value and drop within DATA area
(it'll appear as Sum of Value)

Double-click on Member No
Select None under Subtotals OK

Click Finish

The Pivot Table (PT) will appear
in a new sheet to the left of Sheet1

In the PT:

Right-click on the vertical "Grand Total" label Delete
Right-click on the horiz "Grand Total" label Delete
(you could of course, retain the 2 Grand Totals <g)

and what you'll get remaining is essentially:

Member No. Date Unit A Unit B
50772 28/02/2005 480 875
50772 02/03/2005 109
66221 28/02/2005 390
77344 28/02/2005 133
77344 03/03/2005 600 82


There ... with some deft mouse control / touches,
you should be able to create the PT in under 30 secs <g

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Stu-Gnu" wrote in message
...
I have the following type of raw data:

Member No. Date Type Value
50772 28/02/2005 Unit A 480
50772 28/02/2005 Unit B 875
50772 02/03/2005 Unit A 109
66221 28/02/2005 Unit B 390
77344 28/02/2005 Unit A 133
77344 03/03/2005 Unit A 600
77344 03/03/2005 Unit B 82

I need to rearrange it so that 'A' and 'B' Unit Types appear in the same
row, where the Member no. and the Date are the same, otherwise, they

remain
in seperate rows. The result should look as follows:

Member No. Date Unit A Unit B
50772 28/02/2005 480 875
50772 02/03/2005 109
66221 28/02/2005 390
77344 28/02/2005 133
77344 03/03/2005 600 82

Any suggestions as to the easiest way of doing this would be appreciated.




  #5   Report Post  
Max
 
Posts: n/a
Default

Great add-on, Bernie ! Thanks ..
( .. with some practice, the exact table could still be up in under 30 secs!
<g)
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----




  #6   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Stu,

Make sure you have actual numbers - no extra spaces, etc. - in those
fields.

HTH,
Bernie
MS Excel MVP

"Stu-Gnu" wrote in message
...
Thanks Max - I hadn't thought of using a PT. The only problem I have
encountered is that using Sum of Value in the DATA area shows zeros and i
can't get it to show the appropriate values.



  #7   Report Post  
Max
 
Posts: n/a
Default

"Stu-Gnu" wrote
Thanks Max - I hadn't thought of using a PT.


You're welcome !

See Bernie's add-on steps to drive out the exact table

The only problem I have encountered
is that using Sum of Value in the DATA area shows zeros
and i can't get it to show the appropriate values.


Probably the numbers in source data under "Value" are text ..

Try this on the source data in Sheet1
Copy an empty cell
Select the Value col
Right-click Paste special Add OK
This should "coerce" the text numbers to real numbers

Then go to the PT sheet:
Right-click anywhere within the PT Refresh Data

It should display correctly now
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----


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
moving data in excel without deleting existing data jigna Excel Discussion (Misc queries) 1 January 30th 05 11:35 AM
Pulling data from 1 sheet to another Dave1155 Excel Worksheet Functions 1 January 12th 05 05:55 PM
Running Data Table using an input that triggers DDE linked data [email protected] Excel Discussion (Misc queries) 1 December 16th 04 11:56 AM
Data Table - does it work with DDE links and Stock Tickers? Post Tenebras Lux Excel Worksheet Functions 0 December 1st 04 05:17 PM
Data Table - Does it work with DDE links and stock tickers? Post Tenebras Lux Excel Discussion (Misc queries) 0 December 1st 04 05:15 PM


All times are GMT +1. The time now is 07:37 AM.

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

About Us

"It's about Microsoft Excel"