Feeding multiple client sales into new tab

Peterball

New Member
Joined
Dec 14, 2016
Messages
2
Hi,

This may have been answered before.

I am looking to develop a excel system where I can enter the customers name and information on the first tab along with their sale item and then this information will feed through to a new tab based on the customers name.

If i had the below list
Account NameDate ProductPrice
1Peter01/01/2016 Hat2.5
2Paul06/01/2016 Scarf3
3David15/01/2016 Hat2
4Steven03/02/2016 Gloves3.5
5Peter06/02/2016 Gloves3.5
6David17/02/2016 Scarf3
7Peter20/02/2016 Socks4
8Steven25/02/2016 Hat2.5

<colgroup><col><col><col span="2"><col span="2"></colgroup><tbody>
</tbody>



I would then want this information to feed to a separate tab for each person.
I can find the information using VLOOK up but then it will not show multiple items.

I would like the next tab to populate for Peter as per below
Account NameDate ProductPrice
Peter01/01/2016 Hat2.5
Peter06/02/2016 Gloves3.5
Peter20/02/2016 Socks4

<colgroup><col><col><col span="3"></colgroup><tbody>
</tbody>


If I then had a new sale, I ad it to the main tab and it populates the other tabs for me.

Thanks in advance for your help.

Regards,
Peter
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Easier way to do this would be to use a pivot table, which will summarize the data by names for you. Check this link for reference if needed:

https://support.office.com/en-us/ar...eet-data-a9a84538-bfe9-40a9-a8e9-f99134456576

If for some reason, you need anyways a sheet/tab for each person, PivotTables have a "Show Report Filter Pages" that can do this for you. In this case you would only need to have the Account Names in the filter area of the pivottable, and the rest of the columns in the rows area.
 
Upvote 0
Easier way to do this would be to use a pivot table, which will summarize the data by names for you. Check this link for reference if needed:

https://support.office.com/en-us/ar...eet-data-a9a84538-bfe9-40a9-a8e9-f99134456576

If for some reason, you need anyways a sheet/tab for each person, PivotTables have a "Show Report Filter Pages" that can do this for you. In this case you would only need to have the Account Names in the filter area of the pivottable, and the rest of the columns in the rows area.


Hi,

I have tried this but am still having issues.

The pivot table will show a sum of the information but I want this t create a list automatically on the next page.

This will be used to compile a list of transactions that can be sent to the customer.

That is why I was hoping that the information would feed into the new tab one after the other.

I am not sure how to go about this with Pivot Table.

Thanks sorry im not more adapt at this but I appreciate the help.

Regards,
Peter
 
Upvote 0
Try this...
A​
B​
C​
D​
E​
1​
Account NameDateProductPrice
2​
Peter
1/1/2016​
0Hat
2.5​
3​
Peter
6/2/2016​
0Gloves
3.5​
4​
Peter
20/02/2016​
0Socks
4​
A2=IFERROR(INDEX(Sheet1!B:B,SMALL(IF(Sheet1!$B$2:$B$9="Peter",ROW(Sheet1!$B$2:$B$9)),ROWS($A$1:A1))),"")
ARRAY entered, using CTRL SHIFT ENTER, not just enter

Note that I manually entered Peter, but if you need to pull the sheet name, you could put this in a helper cell somewhere and then reference that...
=MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255)
 
Upvote 0
Try this:-
NB:- This code will create sheets as per names in column "A" sheet1 and fill accordingly.
Code:
[COLOR="Navy"]Sub[/COLOR] MG14Dec25
[COLOR="Navy"]Dim[/COLOR] Rng [COLOR="Navy"]As[/COLOR] Range, Dn [COLOR="Navy"]As[/COLOR] Range, n [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long,[/COLOR] Q [COLOR="Navy"]As[/COLOR] Variant, Ac [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long[/COLOR]
[COLOR="Navy"]Dim[/COLOR] K [COLOR="Navy"]As[/COLOR] Variant, Sht [COLOR="Navy"]As[/COLOR] Worksheet
[COLOR="Navy"]With[/COLOR] Sheets("Sheet1")
    [COLOR="Navy"]Set[/COLOR] Rng = .Range(.Range("A2"), .Range("A" & Rows.Count).End(xlUp))
[COLOR="Navy"]End[/COLOR] With
    [COLOR="Navy"]With[/COLOR] CreateObject("scripting.dictionary")
        .CompareMode = vbTextCompare
    [COLOR="Navy"]For[/COLOR] [COLOR="Navy"]Each[/COLOR] Dn [COLOR="Navy"]In[/COLOR] Rng
        [COLOR="Navy"]If[/COLOR] Not .Exists(Dn.Value) [COLOR="Navy"]Then[/COLOR]
            ReDim ray(1 To 4, 1 To 2)
            ray(1, 1) = "Account Name": ray(2, 1) = "Date": ray(3, 1) = "Product": ray(4, 1) = "Price"
            [COLOR="Navy"]For[/COLOR] Ac = 1 To 4
            [COLOR="Navy"]If[/COLOR] Ac = 2 [COLOR="Navy"]Then[/COLOR]
                ray(Ac, 2) = CDbl(DateValue(Dn(, Ac)))
            [COLOR="Navy"]Else[/COLOR]
                ray(Ac, 2) = Dn(, Ac)
            [COLOR="Navy"]End[/COLOR] If
            [COLOR="Navy"]Next[/COLOR] Ac
            .Add Dn.Value, ray
        [COLOR="Navy"]Else[/COLOR]
            Q = .Item(Dn.Value)
                ReDim Preserve Q(1 To 4, 1 To UBound(Q, 2) + 1)
                [COLOR="Navy"]For[/COLOR] Ac = 1 To 4
                    [COLOR="Navy"]If[/COLOR] Ac = 2 [COLOR="Navy"]Then[/COLOR]
                        Q(Ac, UBound(Q, 2)) = CDbl(DateValue(Dn(, Ac)))
                    [COLOR="Navy"]Else[/COLOR]
                        Q(Ac, UBound(Q, 2)) = Dn(, Ac)
                    [COLOR="Navy"]End[/COLOR] If
                [COLOR="Navy"]Next[/COLOR] Ac
            .Item(Dn.Value) = Q
        [COLOR="Navy"]End[/COLOR] If
    [COLOR="Navy"]Next[/COLOR]
Application.ScreenUpdating = False
[COLOR="Navy"]For[/COLOR] [COLOR="Navy"]Each[/COLOR] K [COLOR="Navy"]In[/COLOR] .keys
     Application.DisplayAlerts = False
        [COLOR="Navy"]On[/COLOR] [COLOR="Navy"]Error[/COLOR] [COLOR="Navy"]Resume[/COLOR] [COLOR="Navy"]Next[/COLOR]
        Sheets(K).Delete
         [COLOR="Navy"]On[/COLOR] [COLOR="Navy"]Error[/COLOR] GoTo 0
     Application.DisplayAlerts = True
        Sheets.Add(after:=Sheets(Sheets.Count)).Name = K
        [COLOR="Navy"]Set[/COLOR] Sht = ActiveSheet
        Sht.Range("A1").Resize(UBound(.Item(K), 2), 4).Value = Application.Transpose(.Item(K))
        Sht.Range("B:B").NumberFormat = "dd/mm/yyyy"
        [COLOR="Navy"]With[/COLOR] Sht.Range("A1").Resize(UBound(.Item(K), 2), 4)
            .Borders.Weight = 2
            .Columns.AutoFit
        [COLOR="Navy"]End[/COLOR] With
[COLOR="Navy"]Next[/COLOR] K
Application.ScreenUpdating = True
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]With[/COLOR]
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Regards Mick
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,272
Members
449,075
Latest member
staticfluids

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