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

-emma-

Board Regular
Joined
Jul 14, 2006
Messages
180
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

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Maybe a pivot table?

Data Range
A
B
C
D
E
F
G
1
Name​
Type​
Quantity​
Sum of Quantity​
Column Labels​
2
John​
In​
6​
Row Labels​
In​
Out​
3
Simon​
In​
6​
John​
7​
12​
4
Simon​
In​
6​
Matt​
1​
7​
5
Simon​
Out​
7​
Simon​
12​
10​
6
Matt​
Out​
7​
Grand Total​
20​
29​
7
John​
In​
1​
8
John​
Out​
12​
9
Simon​
Out​
3​
10
Matt​
In​
1​
 
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,214,983
Messages
6,122,583
Members
449,089
Latest member
Motoracer88

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