ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   I need a help formula (https://www.excelbanter.com/excel-worksheet-functions/270798-i-need-help-formula.html)

Khaled[_2_]

I need a help formula
 
Hi,

I need a formula to help on the following:

I have this range of numbers: 43, 50, 57, 66, 76, 87

And if I entered 43 in a cell and 76 in another cell, I need a 3rd
cell to tell me that the distance is 4 steps!

Thanks in advance.

Khaledity

Ron Rosenfeld[_2_]

I need a help formula
 
On Thu, 12 May 2011 07:32:24 -0700 (PDT), Khaled wrote:

Hi,

I need a formula to help on the following:

I have this range of numbers: 43, 50, 57, 66, 76, 87

And if I entered 43 in a cell and 76 in another cell, I need a 3rd
cell to tell me that the distance is 4 steps!

Thanks in advance.

Khaledity


Assuming your range of numbers is entered in a range of contiguous cells:

=MATCH(Number2,RangeOfNumbers,0)-MATCH(Number1,RangeOfNumbers,0)

This will given an error if Number 1 or Number 2 do not match exactly one of the values in your Range Of Numbers. If you require different behavior, you will need to let us know.



All times are GMT +1. The time now is 12:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com