• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

how to abstract data to another sheet

Hi all,
I am trying to make an automation where I have the database in “sheet2”, in database I have two company name like “A” and “B”.
I want to split the Company “A” data and Company “B” data in to different sheets.
I have inserted combobox in “sheet1” where I am using the company name I want to select the company name from combobox and want to hit the button so that it will show me the filter data company wise in two different sheet.


Please help me out.
 
Hi, Nipendra.dhiman!

In procedure CommandButton1_Click change this line:
Code:
        Cells(lastRow + 1, 1).Select
by this one:
Code:
        Activesheet.Cells(lastRow + 1, 1).Select
and this line:
Code:
        ActiveCell.Offset(0, 2).Select
by this one:
Code:
        ActiveCell.Offset(0, 5).Select

You may want to add an initial:
Code:
        Application.ScreenUpdating = False
and a last one setting again to true, to avoid flickering

Regards!
 
here i have attached the sample
Here is a working solution. Not tested exhaustively but below is how it works:

Maintain a list of unique company names in your data sheet. This is a dynamic range so you just need to add it to the list. Combo box is autopopulated with the list when you open the sheet. Refresh just re-loads your combo list. When you click on the 'get abstract' button it filters the base data based on selected value and copies the data to corresponding sheet. If a sheet is not already present for the selected value, it creates a sheet first and then copies the data.
 

Attachments

  • Sample_worked.xlsm
    41.8 KB · Views: 8
Back
Top