Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Text To Column Question

Hi everyone,

I'm hoping someone can help me...here goes. I have a spreadsheet
similar to this (this is obviously a sample but similar to the real
thing):

PetID Medication Dosage
0001 Anti-itch 10mg
0001 IV Bag 1000mg
0001 Vitamin shot 200mg
0002 Anti-itch 20mg
0002 IV Bag 6000mg
0002 Vitamin shot 100mg

Note that the petIDs are repeated because one pet can have many
dedication at any dosage.

I'd like the spreadsheet to look like this:

PetID Anti-inch IV Bag Vitamin Shot
0001 10mg 1000mg 200mg
0002 20mg 600mg 100mg

Any way to do this easily? I have over 600 records and the thought of
manually doing this nauseates me!

Thanks in advance.
TCM

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Text To Column Question


Create a helper column DosID in column D with formula =A2&B2, dragged down
as required.
Create a pivot table on a new sheet with PetID as row, Medication as column,
Dosage as data.
Select all cells in pivot table sheet, Copy and PasteSpecial(Values) them in
a new sheet.
Delete unnecessary total row an column.
Enter this formula in cell B4 (at intersection of 0001 row and Anti-itch
column):
=INDEX(Sheet1!$C:$C,MATCH($A5&B$4,Sheet1!$D:$D,0))
Sheet1 being your original sheet.
Drag formula to the right and down as required.


Regards,
Stefi

ezt *rta:

Hi everyone,

I'm hoping someone can help me...here goes. I have a spreadsheet
similar to this (this is obviously a sample but similar to the real
thing):

PetID Medication Dosage
0001 Anti-itch 10mg
0001 IV Bag 1000mg
0001 Vitamin shot 200mg
0002 Anti-itch 20mg
0002 IV Bag 6000mg
0002 Vitamin shot 100mg

Note that the petIDs are repeated because one pet can have many
dedication at any dosage.

I'd like the spreadsheet to look like this:

PetID Anti-inch IV Bag Vitamin Shot
0001 10mg 1000mg 200mg
0002 20mg 600mg 100mg

Any way to do this easily? I have over 600 records and the thought of
manually doing this nauseates me!

Thanks in advance.
TCM


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 663
Default Text To Column Question

Hi,

Do the following:

1. On the Data menu, point to Filter, and then click AutoFilter.
2. Delete the Medication and Dosage header
3. Select the range of 0001 as shown below:

PetID
0001 Anti-itch 10mg
0001 IV Bag 1000mg
0001 Vitamin shot 200mg

4. On the Edit menu, click Copy
5. Click a cell as a new location.
6. On the Edit mneu, click Paste Special. The paste Special dialog box
appears.
7. Click Tanspose check box and then click the OK to return to the Worksheet.

PetID 0001 0001 0001
Anti-itch IV Bag Vitamin shot
10mg 1000mg 200mg
0002 0002 0002
Anti-itch IV Bag Vitamin shot
20mg 6000mg 100mg

8. Clean the structure.

Challa Prabhu



" wrote:

Hi everyone,

I'm hoping someone can help me...here goes. I have a spreadsheet
similar to this (this is obviously a sample but similar to the real
thing):

PetID Medication Dosage
0001 Anti-itch 10mg
0001 IV Bag 1000mg
0001 Vitamin shot 200mg
0002 Anti-itch 20mg
0002 IV Bag 6000mg
0002 Vitamin shot 100mg

Note that the petIDs are repeated because one pet can have many
dedication at any dosage.

I'd like the spreadsheet to look like this:

PetID Anti-inch IV Bag Vitamin Shot
0001 10mg 1000mg 200mg
0002 20mg 600mg 100mg

Any way to do this easily? I have over 600 records and the thought of
manually doing this nauseates me!

Thanks in advance.
TCM


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
COUNTIF: 2 criteria: Date Range Column & Text Column MAC Excel Worksheet Functions 14 September 16th 08 04:39 PM
Counting a mixed text/number column based on text in another colum Sierra Vista Steve Excel Discussion (Misc queries) 3 December 17th 06 05:30 PM
To copy values in a column relevant to text in an adjacent column? Guy Keon Excel Worksheet Functions 2 November 15th 05 08:10 PM
Wrap text in column headers to fit text in column MarkN Excel Discussion (Misc queries) 10 November 11th 05 04:21 AM
How I can print full text bigger than column, in repeat column Prince Excel Discussion (Misc queries) 0 August 11th 05 07:28 PM


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