VBA to append list

B52

New Member
Joined
May 4, 2021
Messages
2
Office Version
  1. 365
I would like to get a VBA code to help me create timely a nested list on sheet 2 based on information on sheet 1. I cannot copy/paste so many names for each account.
On sheet1, I have in column A list of Accounts and in column B list of companies.
The code will take each account and repeat the name of the companies in the new sheet2. As a result, I can easily filter by Account or by Company name on the sheet 2 and be able to do all pivots. and lookup of the balance value from a system.

Column A Column B
Account #1 Company Name1
Accopunt#2 Company Name2
... ...

Etc etc
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
I would like to get a VBA code to help me create timely a nested list on sheet 2 based on information on sheet 1. I cannot copy/paste so many names for each account.
On sheet1, I have in column A list of Accounts and in column B list of companies.
The code will take each account and repeat the name of the companies in the new sheet2. As a result, I can easily filter by Account or by Company name on the sheet 2 and be able to do all pivots. and lookup of the balance value from a system.

Column A Column B
Account #1 Company Name1
Accopunt#2 Company Name2
... ...

Etc etc
Can you post a sample data of what you're trying to achieve?
 
Upvote 0
Can you post a sample data of what you're trying to achieve?
Please see attached the sample on Sheet1 and expected result on sheet2..
I have add a total row for each account.
 

Attachments

  • Sheet2.JPG
    Sheet2.JPG
    42.7 KB · Views: 9
  • Sheet1.JPG
    Sheet1.JPG
    38.8 KB · Views: 10
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,951
Members
449,095
Latest member
nmaske

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