How do I automaticaly transfer data from Columns to lines

Status
Not open for further replies.

russelldt

Board Regular
Joined
Feb 27, 2021
Messages
158
Office Version
  1. 365
Platform
  1. MacOS
I have a file (file1.xlsm), which has 3 columns: Class, Supplier and Invoice. This is a download from an accounting package. The number in the Class column can appear more than once, if more than one invoice has been issued for that Class..

I have a second file (file2.xlsm) that has one line for each Class and in this line there are 4 cells (columns M,N,O &P) for the involve numbers to appear. So, if there is only 1 invoice for the class, the invoice number will appear in cell M of the Class line, if there are 2 invoices, the second invoice will appear in column N, and so on.

Looking for a solution that will do this.

Many thanks
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
pivot table
put cursor in a1, click menu: INSERT,
click Pivot table icon (far left)
accept the given selected data
in far right PivotTable fields, drag the fields you want in ROWS, and Columns and Values.
 
Upvote 0
pivot table
put cursor in a1, click menu: INSERT,
click Pivot table icon (far left)
accept the given selected data
in far right PivotTable fields, put the fields you want in ROWS, and Columns and Values.
Thanks Ranman,

I can't use a pivot here, as the file I am using (File2.xlsm) has other data as well, so unfortunately its not as easy as this. I wish it was.

I need something to specifically look at the Class (column C) in File2, and extract the data from File1and place it in the columns.
 
Upvote 0
It is possible for me to add the data from File2, to a new sheet in File1, and this might provide a simpler solution.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,215,483
Messages
6,125,064
Members
449,206
Latest member
Healthydogs

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top