Extracting Data from a table

Agbarker

New Member
Joined
May 17, 2021
Messages
14
Office Version
  1. 365
Platform
  1. Windows
Hi all,

Looking for some help on extracting data, I have a relatively large table A1 to P272, columns are either names, value (£'s) or %'s

What i am looking to do is on another sheet have the top 30 for each category - snippet of example data below

NameStage 1 countStage 1 Total ValueStage 1 Average ValueConversion Rate Stage 1 to Stage 2Stage 2 CountStage 2 Total ValueStage 2 Average ValueConversion Rate Stage 2 to Stage 3
Annabella Mendoza4£26,240,000£6,560,000100%4£26,240,000£6,560,00025%
Dominic Randolph1£2,000,000£2,000,000100%1£2,000,000£2,000,000100%
Kailey Moreno1£900,000£900,0000%0£0£00%
Myles Stuart1£30,000,000£30,000,000100%1£0£30,000,0000%
Stormi Warner1£1,000,000£1,000,0000%0£0£00%
Jaxton Maldonado2£850,000£425,0000%0£0£00%
Elaina Golden2£2,500,000£1,250,00050%1£1,500,000£1,500,0000%
Amias Vu1£1,000,000£1,000,0000%0£0£00%
Kimora Larsen2£26,500,000£13,250,000100%2£26,500,000£13,250,000100%


For Example

Top 30 - Stage one Count - Showing Name (Column A) and Stage one Count (Column B) - Results Sorted by Column B, High to Low - with a minimum of Stage one count being 2

Results would be

Name (Column A), Stage one Count (Column B)

another could be

Top 30 - Stage 2 Average value, when Stage 1 count is greater than 4 - Sorted by Stage 2 average value

Results would be

Name (Column A), Stage one Count (Column B), Stage 2 Average Value

There will be more for me to do but this should hopefully get me on the right track with your wonderful help

Many thanks

Ash
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
I would do this:

MrExcelPlayground20.xlsx
ABCDEFGHI
1NameStage 1 countStage 1 Total ValueStage 1 Average ValueConversion Rate Stage 1 to Stage 2Stage 2 CountStage 2 Total ValueStage 2 Average ValueConversion Rate Stage 2 to Stage 3
2Annabella Mendoza4£26,240,000£6,560,000100%4£26,240,000£6,560,00025%
3Dominic Randolph1£2,000,000£2,000,000100%1£2,000,000£2,000,000100%
4Kailey Moreno1£900,000£900,0000%0£0£00%
5Myles Stuart1£30,000,000£30,000,000100%1£0£30,000,0000%
6Stormi Warner1£1,000,000£1,000,0000%0£0£00%
7Jaxton Maldonado2£850,000£425,0000%0£0£00%
8Elaina Golden2£2,500,000£1,250,00050%1£1,500,000£1,500,0000%
9Amias Vu1£1,000,000£1,000,0000%0£0£00%
10Kimora Larsen2£26,500,000£13,250,000100%2£26,500,000£13,250,000100%
11
12
13
14
15
16NameStage 1 countNameStage 1 countStage 2 Average Value
17Annabella Mendoza4Annabella Mendoza4£6,560,000
18Jaxton Maldonado2
19Elaina Golden2
20Kimora Larsen2
Sheet20
Cell Formulas
RangeFormula
A17:B20A17=TAKE(SORT(FILTER(A2:B10,B2:B10>=2),2,-1),30)
D17:F17D17=TAKE(SORT(FILTER(CHOOSECOLS(A2:I10,1,2,8),B2:B10>=4),3,-1),30)
Dynamic array formulas.


If you want to take more than 30 if the values are equal (a bunch tied for 30th place) - that could be sorted out too.
 
Upvote 0
Solution
This is Amazing! thank you so much!.

QQ - with the formula =TAKE(SORT(FILTER(CHOOSECOLS(A2:I10,1,2,8),B2:B10>=4),3,-1),30)

how would i add another criteria, so B2:B10>=4 is the same & I2:I10>=25% for example?
 
Upvote 0
In the FILTER Expression where you have B2:B10>=4 - you can have a long string of conditions multiplied together for AND - you can't use the AND function though. That turns it into one answer instead a vector of answers.

So B2:B10>4 becomes "(B2:B10>4)*(I2:I10>=.25)".

You must know that TRUE in excel is '1', and false is '0'. Really any number that's not 0 is true. So multiplying them together serves as "AND".

You can do OR also - by adding. I use the SIGN function in that - its not necessary, but it makes me feel better.
So "SIGN((B2:B10>4)+(I2:I10>=.25))" is OR because the function results in 0 (if they are both false), 1 (if exactly one is true), or 2 (if they are both true). I use SIGN to make it 0 or 1. But it will work without that.

You can mix ANDs and ORs with judicious and often confusing use of parentheses.
 
Upvote 0
Ah ok, that makes sense, so the final formula would be

=TAKE(SORT(FILTER(CHOOSECOLS(A2:I10,1,2,8),SIGN((B2:B10>4)+(I2:I10>=.25)),3,-1),30)

or is that too many brackets?

you have absolutely saved me a lot of time of time with this!!!! Thankyou
 
Upvote 0
It looks right, but keeping track of parentheses is hard - I use in-cell formula carriage returns (Alt-Enter) to see complicated formulas. See if it works.
 
Upvote 0

Forum statistics

Threads
1,224,814
Messages
6,181,124
Members
453,021
Latest member
Justyna P

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