separation of data

alireza123456

New Member
Joined
Aug 3, 2016
Messages
23
Hi
I have a large number of factory data in different sheets and wish separate a specified factory data. please guide me.
for example:
sheet1:
factorysaleincomework day
a102005
b203006
c153005
d55004

<colgroup><col width="70" span="4" style="width:53pt"> </colgroup><tbody>
</tbody>

sheet2:
factorysaleincomework day
b101003
d125004
a142005
f133006
h104005

<colgroup><col width="70" span="4" style="width:53pt"> </colgroup><tbody>
</tbody>

sheet 3:
factorysaleincomework day
a102005
c203004
f304006
a52005

<colgroup><col width="70" span="4" style="width:53pt"> </colgroup><tbody>
</tbody>

i want:
factorysaleincomework day
a102005
a142005
a102005
a52005

<colgroup><col width="70" span="4" style="width:53pt"> </colgroup><tbody>
</tbody>
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Hello Alireza,

Is the sample above a different work book? If so, what is it that you wish to do with this work book?

Cheerio,
vcoolio.
 
Upvote 0
Hello Alizera,

The file that you supplied above has thirteen sheets, each with two columns of data. What is it that you would like to do?
Do you want to summarise the data in a summary sheet using the address ID as a criteria?

Could you please give a full and proper description of the inputs and expected results. The code that I supplied in post #3 probably will not do the same task for you in this new file.

Please advise.

Cheerio,
vcoolio.
 
Upvote 0
Hello Cheerio
this data is household budget survey data.
each sheet is one group of expenditure like:food, housing, ...
i want separate for example 1000 specific address(ID) from all sheet. each address is one household.
i have in other workbook other attributes of household that i should arrange them next.
 
Upvote 0
Hello Alizera,

So, if you select, for example, the address ID 1000, you would like the data from both columns (from all sheets) associated with that address ID to be summarised in a new sheet. Is this correct?

Cheerio,
vcoolio.
 
Upvote 0
also i want a summary of all sheet as total income of each id

each sheet may have repeated id
 
Last edited:
Upvote 0
Hello Alireza,

I have adapted the previous code to suit your latest work book as follows:-


Code:
Sub SearchShts()

Application.ScreenUpdating = False

        Dim lr As Long
        Dim fSearch As String
        Dim ws As Worksheet
        Dim cell As Range
        Dim ws1 As Worksheet
Set ws1 = Worksheets("Summary")

fSearch = ws1.Range("D1").Value

For Each ws In Worksheets
        If ws.Name <> "Summary" And ws.Name <> "List" Then
        
For Each cell In ws.Range("A2:A" & ws.Cells(Rows.Count, "A").End(xlUp).Row)
                 If cell.Value = fSearch Then
                 lr = ws1.Range("A" & Rows.Count).End(xlUp).Row + 1
                 cell.EntireRow.Copy
                 ws1.Range("A" & lr).PasteSpecial xlPasteValues
                 ws1.Range("C" & lr).Value = ws.Name
                 ws1.Columns.AutoFit
                 End If
             Next
       End If
Next ws

ws1.Range("D1") = "SEARCH"
ws1.Select
Application.CutCopyMode = False
Application.ScreenUpdating = True

End Sub

Following is the link to your work book, slightly modified and with the above code implemented:-

https://www.dropbox.com/s/z5nhjan0xvxw6sm/Alireza(2).xlsm?dl=0

You will see that I have added a "Summary" sheet and a "List" sheet. The list sheet simply contains a list of the address IDs in Column A (it has a defined name of "List"). I have just placed a few of the address IDs in this list but all you have to do is add more address IDs to this list and they will appear in the drop down list in cell D1 in the "Summary" sheet. So, select an address ID from the drop down in the "Summary" sheet, click on "GO" and the selected ID details from each sheet will appear in the "Summary" sheet for that particular ID.

From all this, you should now be able to modify/refine your actual work book to suit yourself.

Good luck!

Cheerio,
vcoolio.
 
Upvote 0
Hi Cheerio
Very very thanks dear,
it exactly works as i want.
please guide me if i want a summary of all sheet as show total income of each ID : id1= ... id2=... , ...
God bless you!
Your sincerely Ali
 
Upvote 0

Forum statistics

Threads
1,216,124
Messages
6,128,993
Members
449,480
Latest member
yesitisasport

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