LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel VBA - getPosition UDF

Hello,

I have a column of decimal numbers, and I need to compare my numbe
with the column to find out where my number fits in. Once I know wher
my number fits in, I can perform some calculations on my number. Her
is my data:

OD Titre
3.815 262144
2.912 131072
1.554 65536
0.426 32768
0.084 16384
0.043 8192

Assume my number is 3.5. Notice 3.5 is not in the list, so I want t
find out where it would go if it were in the list. I want to write
getPosition function to do this.

After I find out where my number would go, if it were in the list,
need to perform the following calculations:

A=(sample OD-low OD)/(high OD-low OD)

Titre sample=(A*(high titre-low titre)) + low titre

The "low OD", "high OD", "low titre", and "high titre" values are al
relative to where my number is in the list.

So for 3.5, low OD = 2.912, high OD = 3.815, low titre = 131072, hig
titre = 262144.

Could someone please help me with writing a VB function to do this, a
I do not know where to start.

Thanks

--
Message posted from http://www.ExcelForum.com

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"