excel formula get most right/left values from a row

Hi!

Could someone help me with an Excel formula?

kuva.PNG
Im trying to write a formula, that would read columns F to J , per row, and check what the most left value is and the most right value. Then it would subtract these from each others, as shown in the result field.
Jarkko PelliAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Phillip BurtonDirector, Practice Manager and Computing ConsultantCommented:
Are they always going to be in ascending order?

If so, you can use MIN() and MAX() and subtract one from the other.
0
Jarkko PelliAuthor Commented:
Thanks Philip, unfortunately the numbers are not always in acending order, .
0
Phillip BurtonDirector, Practice Manager and Computing ConsultantCommented:
These are array formulas. So you have to enter them, then press Ctrl+Alt+Enter instead of just Return.
 
Here are the formulas:
 
=INDEX($F3:$J3,SMALL(IF($F3:$J3<>"",COLUMN($F3:$J3)-COLUMN($F3)+1),1))
=INDEX($F3:$J3,SMALL(IF($F3:$J3<>"",COLUMN($F3:$J3)-COLUMN($F3)+1),COUNT($F3:$J3)))
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Jarkko PelliAuthor Commented:
Thanks for the help! I keep getting an #NAME? error when using the formula. Im using Excel 2010.. Would it be possible to post an example of the Excel sheet ?
0
Phillip BurtonDirector, Practice Manager and Computing ConsultantCommented:
These are array formulas. So you have to enter them, then press Ctrl+Alt+Enter instead of just Return, otherwise you will get #NAME? error.

Please find attached.
EE150227.xlsx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jarkko PelliAuthor Commented:
Its Ctrl + shift + Enter in Office 2010 ;) Thanks, its working now! :)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.