Too complex for me! (Filter only unique entries, vlookup and sum I think)

-emma-

Board Regular
Joined
Jul 14, 2006
Messages
184
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I am really stuck with what I want to do. Columns A to C holds information about our customer base who buy or sell us stock.

I am looking to create the results shown in E1:G4 automatically, with scope for this to automatically expand if a new customer name is added in column A.

A few things. Ideally I need the information in Column E to be in the order they appear. (So the newest customer appears at the bottom).

The "Type" result in Column F will always be the same.

I have attached a screen snip, hoping this will help.

Thank you for your time.

Emma

<a href="https://imgbb.com/"><img src="https://image.ibb.co/mDC3XS/Untitled.jpg" alt="Untitled" border="0"></a>
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Maybe a pivot table?

Data Range
[Table="class: grid"][tr][td] [/td][td]
A
[/td][td]
B
[/td][td]
C
[/td][td]
D
[/td][td]
E
[/td][td]
F
[/td][td]
G
[/td][/tr]
[tr][td]
1
[/td][td]
Name​
[/td][td]
Type​
[/td][td]
Quantity​
[/td][td]
[/td][td]
Sum of Quantity​
[/td][td]
Column Labels​
[/td][td]
[/td][/tr]


[tr][td]
2
[/td][td]
John​
[/td][td]
In​
[/td][td]
6​
[/td][td]
[/td][td]
Row Labels​
[/td][td]
In​
[/td][td]
Out​
[/td][/tr]


[tr][td]
3
[/td][td]
Simon​
[/td][td]
In​
[/td][td]
6​
[/td][td]
[/td][td]
John​
[/td][td]
7​
[/td][td]
12​
[/td][/tr]


[tr][td]
4
[/td][td]
Simon​
[/td][td]
In​
[/td][td]
6​
[/td][td]
[/td][td]
Matt​
[/td][td]
1​
[/td][td]
7​
[/td][/tr]


[tr][td]
5
[/td][td]
Simon​
[/td][td]
Out​
[/td][td]
7​
[/td][td]
[/td][td]
Simon​
[/td][td]
12​
[/td][td]
10​
[/td][/tr]


[tr][td]
6
[/td][td]
Matt​
[/td][td]
Out​
[/td][td]
7​
[/td][td]
[/td][td]
Grand Total​
[/td][td]
20​
[/td][td]
29​
[/td][/tr]


[tr][td]
7
[/td][td]
John​
[/td][td]
In​
[/td][td]
1​
[/td][td]
[/td][td]
[/td][td]
[/td][td]
[/td][/tr]


[tr][td]
8
[/td][td]
John​
[/td][td]
Out​
[/td][td]
12​
[/td][td]
[/td][td]
[/td][td]
[/td][td]
[/td][/tr]


[tr][td]
9
[/td][td]
Simon​
[/td][td]
Out​
[/td][td]
3​
[/td][td]
[/td][td]
[/td][td]
[/td][td]
[/td][/tr]


[tr][td]
10
[/td][td]
Matt​
[/td][td]
In​
[/td][td]
1​
[/td][td]
[/td][td]
[/td][td]
[/td][td]
[/td][/tr]
[/table]
 
Upvote 0
I am looking to create the results shown in E1:G4 automatically, with scope for this to automatically expand if a new customer name is added in column A.
This formula approach should do that.
Copy these formulas down as far as you might ever need after adjusting the $100 references to a row number that will be greater than you will ever use in columns A:C

Book1
ABCDEFG
1NameTypeQuantityNameTypeTotal
2JohnIn6JohnIn7
3SimonIn6SimonIn12
4SimonIn6MattIn1
5SimonOut7   
6MattOut7   
7JohnIn1   
8JohnOut12
9SimonOut3
10MattIn1
11
In Total
Cell Formulas
RangeFormula
E2:E7E2=IFERROR(INDEX($A$2:$A$100,MATCH(0,INDEX(COUNTIF($E$1:E1,$A$2:$A$100)+(A$2:A$100=""),0),0)),"")
F2:F7F2=IF(E2="","","In")
G2:G7G2=IF(E2="","",SUMIFS(C$2:C$100,A$2:A$100,E2,B$2:B$100,F2))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,223
Members
452,620
Latest member
dsubash

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