Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Merging columns in Excel

Status
Not open for further replies.

JeffGMACI

Technical User
Jun 16, 2003
12
US
I have an excel question that has been giving me trouble for the last few hours. I have a spreadsheet that looks like this:

Jan Feb Mar
a103 5 a103 5 a89 2
a104 5 a110 8 a110 1
a111 2 a134 1 a111 2

Basically, I have monthly data. The "a103's" are records that specify a product, with the second number being the number of products sold that month. Not all products are sold each month, however, and my data is very large for each month. Is there a way to automate and combine this data to appear like this:

Product Jan Feb Mar
a89 0 0 2
a103 5 5 0
a104 5 0 0 etc

I want the product code on the left, with the quantities in chart form, with zeros where there is nothing listed. Can you guys and girls help me do this? I'd just do it manually, but the data is truly massive, and the only way I could access it was to do it monthly like the first example. Can any of you help me out? Thank you!
 
A pivot table seems to be the easiest tool to do this. It would be easier to summarize if the data stucture were:
Month Item Quantity
Jan a103 5
Jan a104 5
Jan a111 2
Feb a103 5
....
or with dates instead month. A pivot table with single data range could summarize items, grouping dates by month/year could quickly produce a report closed to what you expect.

In case of working with original data - I added headers:
Jan Quant. Feb Quant. Mar Quant.
a103 5 a103 5 a89 2
a104 5 a110 8 a110 1
a111 2 a134 1 a111 2
Next I created pivot table with consolidation option:
1. Data>Pivot table and Consolidation (on 1st page of wizard), >next,
2. Single page option (2nd page), next,
3. selected and added ranges for months, with headers (month by month, step 2b), >next,
4. went layout in step 3, drag 'Page1' field to column area, >finish.

combo
 
That's not a bad idea. I had also thought of doing a vLookup from a master list. I'll see what works, thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top