Select LARGE / IF CRITERIAS / WRITE to another worksheet

gldurand

Board Regular
Joined
Jun 8, 2006
Messages
178
Office Version
  1. 2016
Platform
  1. Windows
Hi Experts

I have a challenge that needs some VBA code or complex formula.

Challenge: I want to write certain fields of the 10 largest values from one worksheet to another

Requirements:

I want to search COLUMN BK from "INPUT FILE" for the 10 largest $$ amounts (There could be duplicates)

I want to copy TOP 10 values to another worksheet as long as Column AK is not DUPLICATE.


Output to new worksheet should be the following

COLUMN AK - COLUMN AS - COLUMN A - COLUMN H - COLUMN T- COLUMN BP - COLUMN BK

Confusing.....Work with me please, i really need to figure this out. I would prefer formulas, nut it might not be possible. So VBA code would be welcome and I would use CONTROLS to run them

Please help

Thanks for all your precious time
 
That is excellent... If I have to put the helper column in the source, it should no tbe a problem...

As far as all-volunteer board, you have gone further than i could ever expect.. I feel real bad that you are spending so much time with me... I will certainly have to "PAY IT FORWARD". :)

Looking forward to your PM... I will send it to you right away
No Problem looking at it tonight... It will be a late night for me anyway.. Thanks my friend

Glenn
 
Upvote 0

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Hi Glenn,

When we applied the formulas I previously posted to your actual data set we discovered they were incorrectly handling cases in which you had duplicate values in your Total Opportunity Value column. That error wasn't apparent from your example data, because there were no duplicates.

I'm pretty sure the revised formulas shown below will return the correct values.

Excel Workbook
ABCDEFGHIJ
1Top 10
2
3IdxOpportunity numberOpportunity DescriptionCustomer namesales stage%close datenet new / renewalIN YEAR VALUETotal Opportunity Value
421XXXXXXX-18nnnNOPB22514Renewal1818
518XXXXXXX-15nnnNOPC32514Renewal1515
610XXXXXXX-8RkkkBCDB22511Net New814
715XXXXXXX-13RnnnNOPA12514Renewal1314
816XXXXXXX-14nnnNOPB22514Renewal1414
912XXXXXXX-10mmmKLMD42513Renewal109
108XXXXXXX-6hhhSTUA1758Net New66
116XXXXXXX-4fffPQRD4256Net New44
123XXXXXXX-2cccGHIB2503Net New22
131XXXXXXX-1aaaABCA1251Net New11
TOP 10
Excel 2007
Cell Formulas
RangeFormula
B4=IF(N($A4),INDEX('Source Data'!$A$2:$L$23,$A4,MATCH(B$3,'Source Data'!$A$1:$L$1,0)),"")
#VALUE!
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}. Note: Do not try and enter these manually yourself

I modified the Total Opportunity Values for items XXXXXXX-8R and XXXXXXX-13R to be $14.00 to test it with duplicates. With the formulas posted earlier item XXXXXXX-8R would have appeared on the list 3 times.

This solution also removes all helper columns (except the Idx column in the Top 10).

Happy Victoria Day my friend! :)
 
Upvote 0

Forum statistics

Threads
1,224,506
Messages
6,179,158
Members
452,892
Latest member
yadavagiri

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