Refining inefficient formula - for personal growth

Whatamk

New Member
Joined
Nov 12, 2013
Messages
4
I am rather proud of myself for the the following bit of formula, but with so many nested commands, I can't help but feel that I am doing this in a rather convoluted way. For the sake of growth, would you have approached this same question differently or more succinctly?

Drawing from this list of data...

GHIJKLMNOP
2Axis IAxis IIAxis IIIAxis IVAxis VBlankDx ≈ FIEp. DxTPOther
33000201210
41382012325281882
5207771442523111
6021431214140

<tbody>
</tbody>

...I set about to create a list of the 3 highest categories (columns) for each row, resulting in...

TUV
2#1 error#2 error#3 error
3Axis IAxis VAxis V
4Axis VDx ≈ FIAxis III
5Dx ≈ FIEp. DxAxis I
6Ep. DxEp. DxAxis IV

<tbody>
</tbody>

As you can see, it's a little weird about equal numbers, but I can live with that. The formula I used was
Code:
=IF(SUM($G3:$P3)=0,"",INDIRECT(CONCATENATE(LEFT(CELL("address",INDEX($G3:$P3,MATCH(LARGE($G3:$P3,1),$G3:$P3,0))),2),"2")))

Any suggestions or thoughts?
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
To avoid repeats for duplicate numbers try this array formula in T3

=IFERROR(INDEX($G$2:$P$2,MATCH(1,($G3:$P3=LARGE($G3:$P3,COLUMNS($T3:T3)))*(COUNTIF($S3:S3,$G$2:$P$2)=0),0)),"")

confirmed with CTRL+SHIFT+ENTER and copied across and down.......I'm assuming column S is empty (or it can be populated but not with any value that might appear in G2:P2)
 
Upvote 0
Works like a charm. Thank you, Barry! Definitely an improvement. I did make one modification: I put the =IF(SUM($G3:$P3)=0,"",(formula) back in rather than IFERROR so zero values returned blank rather than Axis I, Axis II, and Axis III.

As I hoped would happen, I'm a bit baffled by some of what you used (1: index/match combination is brilliant, and 2: I'm still trying to figure out why you used column S for the COUNTIF), so now I'm having to detour from work while I research it. :cool:
 
Upvote 0

Forum statistics

Threads
1,203,465
Messages
6,055,574
Members
444,799
Latest member
CraigCrowhurst

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