Find Two Most Right Non-Null Numbers and Compare

ptrively

New Member
Joined
Jan 29, 2010
Messages
13
Hello!

I have a series of 5 columns, H1-L1, in those columns there can be 0 to 5 values. What I'd like to do, is compare the two furthest right values to a constant

Example:

Constant = 15

H1--I1--J1--K1--L1
10------20-------30

In this, example, I would compare 20 and 30 to my constant, both of these are greater than 15, so I would return True.

I'm POSITIVE I need to use an array, but for the life of me I can't figure out how to get the second number.

Any help is greatly appreciated.

Sincerely,
Paul
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Give this a try:

Change U1 to wherever your constant is located.

=IF(AND(INDEX(H1:L1,,LARGE(IF(ISNUMBER(H1:L1),COLUMN(H1:L1)-7,0),1))>U1,INDEX(H1:L1,,LARGE(IF(ISNUMBER(H1:L1),COLUMN(H1:L1)-7,0),2))>U1),TRUE,FALSE)

Entered with CTRL+SHIFT+ENTER, not just ENTER.

Hopefully someone else may come by with something a bit more elegant.
 
Last edited:
Upvote 0
More elegant not required! I really appreciate your help with this, I'm dissecting it to see where my array formula went wrong! I really appreciate the time you took to respond!
 
Upvote 0

Forum statistics

Threads
1,223,898
Messages
6,175,272
Members
452,628
Latest member
dd2

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