Need help in Filter

Santosh080

Board Regular
Joined
Jul 15, 2016
Messages
73
Office Version
  1. 2021
Platform
  1. Windows
Hello Friends
Please help me so that i can do my job quickly in my office. I have an excel file with data like below.
A B C D E
TypeNamePhonePositionCost
111AAA9214R100
111ALD4532R250
111NVK4271F300
222LFO6534F500
222PGV2872R100
222FOR7575R600
333FLP2727F750
333BVH2278F100
333DGY8372R900

<tbody>
</tbody>

Now i need the above data in the following format,

I want to put "Type" value like 111 or 222 etc. in a cell and the in below "Position" table all data dragged from above table. Can it possible? please help. I do not have any VBA knowledge but i can use formulas like vlookup.

Type
111

<tbody>
</tbody>


Position
RI need here all the number of R from that selected "Type"I need here the total cost of R from that selected "Type"I need here the number of R whose cost is above 150 from that selected "Type"I need here the total cost of R whose cost is above 150 from that selected "Type"
FI need here all the number of F from that selected "Type"I need here the total cost of F from that selected "Type"I need here the number of F whose cost is above 150 from that selected "Type"I need here the total cost of F whose cost is above 150 from that selected "Type"

<tbody>
</tbody>

<tbody>
</tbody>
 
Last edited:

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.
there you are


Book1
ABCDE
1TypeNamePhonePositionCost
2111AAA9214R100
3111ALD4532R250
4111NVK4271F300
5222LFO6534F500
6222PGV2872R100
7222FOR7575R600
8333FLP2727F750
9333BVH2278F100
10333DGY8372R900
11
12Type
13111
14
15
16PositionNoTotal>150<=150
17R2350250100
18F13003000
Sheet1
Cell Formulas
RangeFormula
B17=COUNTIFS($A$2:$A$10,$A$13,$D$2:$D$10,$A17)
C17=SUMIFS($E$2:$E$10,$A$2:$A$10,$A$13,$D$2:$D$10,$A17)
D17=SUMIFS($E$2:$E$10,$A$2:$A$10,$A$13,$D$2:$D$10,$A17,$E$2:$E$10,">150")
E17=C17-D17
 
Upvote 0
Thank you very much for help. :)

In D17 i want the number of R which have above cost above 150 and in E17 cell i need sum of that value.

means if R have two value above 150 ( for example 200 and 300 ) then in cell D17 it should show 2 and in E17 it should show sum of 200 and 300 i.e 500. Can it possible?
i think you understand what i want to tell.
 
Upvote 0
maybe use PivotTable from QueryTable

TypeNamePhonePositionCostType111
111​
AAA
9214​
R
100​
111​
ALD
4532​
R
250​
PositionCount of CostSum of CostCount of Cost>150Sum of Cost>150
111​
NVK
4271​
F
300​
F
1​
300​
1​
300​
222​
LFO
6534​
F
500​
R
2​
350​
1​
250​
222​
PGV
2872​
R
100​
Grand Total
3
650
2
550
222​
FOR
7575​
R
600​
333​
FLP
2727​
F
750​
333​
BVH
2278​
F
100​
333​
DGY
8372​
R
900​

With PowerQuery

QueryTable
TypeNamePhonePositionCostCost>150
111​
AAA
9214​
R
100​
111​
ALD
4532​
R
250​
250​
111​
NVK
4271​
F
300​
300​
222​
LFO
6534​
F
500​
500​
222​
PGV
2872​
R
100​
222​
FOR
7575​
R
600​
600​
333​
FLP
2727​
F
750​
750​
333​
BVH
2278​
F
100​
333​
DGY
8372​
R
900​
900​

Code:
[SIZE=1]let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Added Conditional Column" = Table.AddColumn(Source, "Cost>150", each if [Cost] > 150 then [Cost] else null)
in
    #"Added Conditional Column"[/SIZE]

load As connection then insert PivotTable with Use an external connection
 
Last edited:
Upvote 0
Thank you very much for help. :)

In D17 i want the number of R which have above cost above 150 and in E17 cell i need sum of that value.

means if R have two value above 150 ( for example 200 and 300 ) then in cell D17 it should show 2 and in E17 it should show sum of 200 and 300 i.e 500. Can it possible?
i think you understand what i want to tell.


Book1
ABCDE
1TypeNamePhonePositionCost
2111AAA9214R100
3111ALD4532R250
4111NVK4271F300
5222LFO6534F500
6222PGV2872R100
7222FOR7575R600
8333FLP2727F750
9333BVH2278F100
10333DGY8372R900
11
12Type
13111
14
15
16PositionNoTotal>150<=150
17R23501250
18F1300300300
Sheet1
Cell Formulas
RangeFormula
D17=COUNTIFS($A$2:$A$10,$A$13,$D$2:$D$10,$A17,E2:E10,">150")
E17=SUMIFS($E$2:$E$10,$A$2:$A$10,$A$13,$D$2:$D$10,$A17,E2:E10,">150")
 
Upvote 0

Forum statistics

Threads
1,214,590
Messages
6,120,423
Members
448,961
Latest member
nzskater

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