Calculate a number based on an interval

It seems that I can't figure it out for myself and need some help.
For example I have a random number from 0 to 1:
0.10
0.11
0.24
0.08
0.14

I also have two columns with interval numbers (min and max):
min        max
0.00    0.01
0.01    0.05
0.05    0.14
0.14    0.28

And I have one column more with simple numbers:
20
40
60
80
100

Now what I need. If I will take the first random number (0.10), it matches 
the third interval (0.05-0.14) and after this I have to look for the number 
that corresponds to this interval, in my case it is 60.
I can't figure the formula that looks in what interval that matches the 
random number. Can someone help me with a hint or with a formula?
Thank you!
-- 
Name: Vitalie Ciobanu
Nickname: AISBERG
Homepage: http://aisberg.rau.ro


0
aisberg (15)
3/19/2006 6:42:00 PM
excel 39879 articles. 2 followers. Follow

4 Replies
458 Views

Similar Articles

[PageSpeed] 4

if you could sort all your columns then you could use VLOOKU

--
davesexce
-----------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=3170
View this thread: http://www.excelforum.com/showthread.php?threadid=52406

0
3/19/2006 7:25:02 PM
The random values are in A2:A6
The Min values in B2:B6 (Max values not needed)
This formula =INDEX($D$2:$D$6,MATCH(A2,$B$2:$B$5,1))
returns the required 60
best wishes
-- 
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Vitalie Ciobanu" <aisberg@rau.ro> wrote in message 
news:eEBosT4SGHA.5736@TK2MSFTNGP10.phx.gbl...
> It seems that I can't figure it out for myself and need some help.
> For example I have a random number from 0 to 1:
> 0.10
> 0.11
> 0.24
> 0.08
> 0.14
>
> I also have two columns with interval numbers (min and max):
> min        max
> 0.00    0.01
> 0.01    0.05
> 0.05    0.14
> 0.14    0.28
>
> And I have one column more with simple numbers:
> 20
> 40
> 60
> 80
> 100
>
> Now what I need. If I will take the first random number (0.10), it matches 
> the third interval (0.05-0.14) and after this I have to look for the 
> number that corresponds to this interval, in my case it is 60.
> I can't figure the formula that looks in what interval that matches the 
> random number. Can someone help me with a hint or with a formula?
> Thank you!
> -- 
> Name: Vitalie Ciobanu
> Nickname: AISBERG
> Homepage: http://aisberg.rau.ro
>
> 


0
bliengme5824 (3040)
3/19/2006 7:32:42 PM
Hi!

Your ranges overlap:

> min        max
> 0.00    0.01
> 0.01    0.05
> 0.05    0.14
> 0.14    0.28

For example: 0.05 can't be both the max for one interval and the min for 
another interval.

Try this table:

min.................interval
0........................20
0.02...................40
0.06...................60
0.15...................80
0.29..................100

Then use this formula:

A1 = random number = 0.10

=VLOOKUP(A1,H$1:J$5,2)

Where H$1:J$5 is the above table. 2 refers to the Interval column of that 
table.

Biff

"Vitalie Ciobanu" <aisberg@rau.ro> wrote in message 
news:eEBosT4SGHA.5736@TK2MSFTNGP10.phx.gbl...
> It seems that I can't figure it out for myself and need some help.
> For example I have a random number from 0 to 1:
> 0.10
> 0.11
> 0.24
> 0.08
> 0.14
>
> I also have two columns with interval numbers (min and max):
> min        max
> 0.00    0.01
> 0.01    0.05
> 0.05    0.14
> 0.14    0.28
>
> And I have one column more with simple numbers:
> 20
> 40
> 60
> 80
> 100
>
> Now what I need. If I will take the first random number (0.10), it matches 
> the third interval (0.05-0.14) and after this I have to look for the 
> number that corresponds to this interval, in my case it is 60.
> I can't figure the formula that looks in what interval that matches the 
> random number. Can someone help me with a hint or with a formula?
> Thank you!
> -- 
> Name: Vitalie Ciobanu
> Nickname: AISBERG
> Homepage: http://aisberg.rau.ro
>
> 


0
biffinpitt (3171)
3/19/2006 7:34:29 PM
to davesexcel: I can not sort the columns because they are randomly 
generated and it doesn't meet my needs. Thanks anyway!

to Bernard Liengme: Thank you for answering. Although I do not understand 
what the formula looks for in D2:D6.

to Biff: Your example seems to be the best! Now I need to make some changes 
and make my problem work.

Thanks to all for helping me!!!! Have a nice day!

-- 
Name: Vitalie Ciobanu
Nickname: AISBERG
Homepage: http://aisberg.rau.ro

"Vitalie Ciobanu" <aisberg@rau.ro> wrote in message 
news:eEBosT4SGHA.5736@TK2MSFTNGP10.phx.gbl...
> It seems that I can't figure it out for myself and need some help.
> For example I have a random number from 0 to 1:
> 0.10
> 0.11
> 0.24
> 0.08
> 0.14
>
> I also have two columns with interval numbers (min and max):
> min        max
> 0.00    0.01
> 0.01    0.05
> 0.05    0.14
> 0.14    0.28
>
> And I have one column more with simple numbers:
> 20
> 40
> 60
> 80
> 100
>
> Now what I need. If I will take the first random number (0.10), it matches 
> the third interval (0.05-0.14) and after this I have to look for the 
> number that corresponds to this interval, in my case it is 60.
> I can't figure the formula that looks in what interval that matches the 
> random number. Can someone help me with a hint or with a formula?
> Thank you!
> -- 
> Name: Vitalie Ciobanu
> Nickname: AISBERG
> Homepage: http://aisberg.rau.ro
>
> 


0
aisberg (15)
3/19/2006 7:55:32 PM
Reply:

Similar Artilces:

Calculating Taxes and Making calculations
Hello, Kindly plz tell me how do i go about making some small calculations based on my existing data such as how to compute taxes and do other calculations based on some quantitative data. where exactly do i make modifications on my application??? Kindly help me out. Thanks , swati you can add code in javascript behind dropdowns or piclist fields. One example might be a dropdown which has shipping options ie ups, fedex etc. When you choose one it takes the weight of your package (whcih you enter) then calculates a shipping cost. search the archives of this group at groups.google.com and ...

Procedure to calculate distance using latitude/longitude
Does anyone know of a vba procedure for access that will calculate straightline distance using latitude and logitude for 2 points? AJ wrote: > Does anyone know of a vba procedure for access that will calculate > straightline distance using latitude and logitude for 2 points? See: http://groups.google.com/group/microsoft.public.access/msg/6b934b0e580b974b James A. Fortune MPAPoster@FortuneJames.com ...

Insert text in Cell A1 based on keyword criteria
I want to populate cell A1 with specific text (the word "Active") whenever the word "Yes" is found in cells A2:A20. Whenever the word "Yes" is not found in cells A2:A20 I want to leave cell A1 blank. <twlove@ontuet.com> wrote in message news:1150210856.375367.146410@c74g2000cwc.googlegroups.com... >I want to populate cell A1 with specific text (the word "Active") > whenever the word "Yes" is found in cells A2:A20. Whenever the word > "Yes" is not found in cells A2:A20 I want to leave cell A1 blank. =IF(COUNTIF(A2:...

How to calculate age of a person?
Hi, I'm struggling to figure this one out. I have a date column and I'd like to be able to calculate the age without doing it in my head. I've tried to do this but am struggling. Any help will greatly appreciated. Thanks Suzanne Visit www.cpearson.com and search for DATEDIFF best wishes -- Bernard V Liengme Microsoft Excel MVP www.stfx.ca/people/bliengme remove caps from email "Grd" <Grd@discussions.microsoft.com> wrote in message news:6BFFD11C-AECB-4837-93B6-D84B6170B975@microsoft.com... > Hi, > > I'm struggling to figure this one out. I have...

EXCEL 2007 Formula to calculate INTEREST only on a 3 month bridge
I am trying to calculate monthly INTEREST ONLY payment on a short term bridge/swing loan. Assuming an interest rate of 2.75%, paid monthly, Also assuming it will be required for a 3-6 month period, amount approx $500,000. Just switched to Excel 2007 but don't seem to be able to calculate using the formula builder. Not sure if it is compounded daily or monthly. You might want to check out the IPMT function. From the XL help file: IPMT(rate,per,nper,pv,fv,type) Rate is the interest rate per period. Per is the period for which you want to find the interest and must...

Preventing Blank based on another Cell
I would like to validate data but cant quite get the formula right. I have a cell (say F7) that cannot be blank if (say E7) another cell equals a text value (say "S"). Anyone have an idea? I am stumped at this seemingly easy task. I forgot to add the valid combinations: E7 = P and F7 = Entry: OK E7 = P and F7 = Blank: OK E7 = S and F7 = Entry: OK E7 = S and F7 = Blank: INVALID bluegrassstateworker wrote: > I would like to validate data but cant quite get the formula right. I > have a cell (say F7) that cannot be blank if (say E7) another cell > equals a text value (sa...

Due Date Calculated
I need assistance on an expression that allows for the due date of recurring training to be one year from date completed. Details are as follows: I have a form named [frmTRNComplete] based on table named [tblTRNComplete] Form controls are: TRNID (combo box), DateComp (Text Box) , DateNext (text box), Reccuring (check box) I would like the DateNext to be 1 year from DateComp if Reccuring is true and Date next to be blank if Reccuring is false. -- Aloha, Ron A. Ron I'll assume that you want to use the form to calculate the DateNext, and that you are not trying to s...

Number not showing correctly
Hi, I had tried to enter a 12digit number in a worksheet but after entering it its not showing the coorrect number.Eg Iam trying to enter 857268578633 in the work sheet but after entering its showing 8.57269e+11 Why its happened Like this can you please explain me the format of the cell is probably 'General' instead of number. When you select number you can select the number of decimal places and/or the comma and negative number format if you like. If it then shows up as ###### or still has the scientific format appearance, you can widen the column. "Nawas" wrote: ...

how to calculate outliers
Google is your friend: http://www.google.com/search?q=calculate+outliers - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "ismhs" <ismhs@discussions.microsoft.com> wrote in message news:035124A0-06FA-4153-932E-6C4E0614F38C@microsoft.com... > ...

Increasing CRM Idle Timeout - Forms based authentication
We are using crm in a hosted environment - with forms based authentication. How can the default timeout of 10-20 minutes be increased?? I have increased the 'session state' timeout, but it does not help. Users still have to re-login after 20 mins of innactivity. Thanks!!! ...

New! Consecutive Numbering Tutorial for Publisher 2002/2003
http://www.mvps.org/publisher/numbering1.html Brian Kvalheim Microsoft Publisher MVP http://www.kvalheim.org ...

group of numbers
How can I make a bunch of numbers being recognized as a group? I've got the following numbers: 1, 2, 3, 4, 5 and 6. I want them to be considered as a group. How can I achieve it? Thank you for your attention --- Message posted from http://www.ExcelForum.com/ You can name the range of cells that contain the numbers. There are instructions here: http://www.contextures.com/xlNames01.html If that's not what you're trying to do, perhaps you could give a bit more detail. PeaceMaker < wrote: > How can I make a bunch of numbers being recognized as a group? > > I&...

How to get the digit number of a LONGLONG data?
How to get the digit number of a LONGLONG data? for example:LONGLONG aaa=123; then the digit number is 3; LONGLONG aaa=5678; then the digit number is 4; Another way is: int digits = 0; LONGLONG number = aaa; while (number > 0) { number /= 10; digits++; } Geo >-----Original Message----- >How to get the digit number of a LONGLONG data? >for example:LONGLONG aaa=123; then the digit number is 3; > LONGLONG aaa=5678; then the digit number is 4; > > >. > As long as the number isn't negative. "Geo" <ckarakiro@hotm...

Limit choices in one cell dependent based on choice in other cell
Does anybody know if and how to limit the choices in one cell (from a list) based on the choice (from a list) in another cell? For example, if (from a list) they pick "Customer Communication" in say column M, they would only get the choice of three issues (instead of the entire list) in column N. Thanks! Mahaas Debra Dalgleish shows how to use dependent lists with data|validation here: http://contextures.com/xlDataVal02.html michelle.haas@xerox.com wrote: > > Does anybody know if and how to limit the choices in one cell (from a > list) based on the choice (from a list) ...

transaction number #2
hi all while generating detailed sales report in mrms 1.3 we select transaction number to view journal of that particular bill,we find correct details in journal. But when we see in detailed sales report , we find items which are not a part of that journal displayed under transaction #. Is there query any problem in detailed sales report query in qrp reports. Rizwan, Have you tried to reindex the database? It's in the RMS Administrator under the database menu. Are you having any other issues with the software? Daniel techs1@nurol.com NuRol Point of Sale www.nurol.com 404-352-...

Numbering
Hi, I am new to Word 2007 and am looking for a little be of help. hopefully someone knows the answer. I am creating a document with various headings. Having set-up my styles I have now encoutered a problem. I have various sections and the numbering is ok for Section A, however, when I reach Section B although the main heading is ok "2 SECTION B" (the numbering following from the main heading of SECTION A), the main body numbering follows of from Section A and does not restart. See example below At the present the document looks like this: 1 SECTION ...

Calculated field options???
Here's my Data: Country Status --------- ---------- Canada Green Canada Blue Canada Green Canada Green Canada Blue In my pivot table, 'Country' is an item, and 'Status' is my only data field. What I really need to show in my data area is two column of data, one for 'Green' and one for 'Blue'. I tried creating two 'Calculated' fields with the following formulas, but they don't seem to be working: 'CalculatedField1' = IF((STATUS="Green"),1,0) 'CalculatedF...

Page Numbers across worksheets
Does anyone know how to setup page numbers in the footer that will print continuously across worksheets when you chose print entire workbook from Excel 2000 or later? The closest I was able to come was to print the tab name so that the pages came out as worksheet1 page1 Worksheet1 Page2, Worksheet2 Page 1, Worksheet3, Page 1 Etc. Thanks! Daryl You just press the CTRL key and click the specified worksheets tab, then use print preview (or print directly), you may find out the page number is continously. HTH Harry "Daryl G." <Not@Provided.com> �b�l�� news:ejJBNJBeDHA.1832@...

Assigning numbers to duplicates
I have some several fields that have duplicate Patient_ID and I would like to count those duplicates and assign them a number for example. Patient_ID Radiology 123 MRI 123 CT 123 MRI 127 CT 127 CT 138 CT I have been using the Total Count in the query but it summarizes the count for all Patients what I need is this: Patient_ID Radiology Count_Per_Patient 123 MRI 1 123 CT 2 123 MRI 3 127 CT 1 127 CT 2 138 CT ...

How can I increse the number of rows?
Microsoft Excel has 65536 rows and I need more rows. Thanks. Use quattro pro. -- Gary''s Student "Miguel Arenas" wrote: > Microsoft Excel has 65536 rows and I need more rows. > > Thanks. No. Sorry. Use multiple worksheets. ************ Anne Troy www.OfficeArticles.com "Miguel Arenas" <MiguelArenas@discussions.microsoft.com> wrote in message news:44FED374-C997-45B6-BA4B-FF854194264C@microsoft.com... > Microsoft Excel has 65536 rows and I need more rows. > > Thanks. Then you need to use more sheets, or consider another application...

tenure calculations
how can I format several dates such as 04/19/2003, 04/01/2004, etc. int a yearly average for the employee tenure -- Message posted from http://www.ExcelForum.com right now say I have my yearly figures in i1-i9. The formula I though would work is =today()-average(i1:i9), but how would i format this to give me yearly read out -- Message posted from http://www.ExcelForum.com Hi djackson! One way is to use YEARFRAC with a third argument of 1 to get your tenures in years and fractions of a year and then average the result. However YEARFRAC does produce some annoying but small errors. Y...

Time Sheet Function to Calculate
I am having some trouble trying to establish a formula that will give me the number of hours worked during the day given the start time say 8.30am with an end time of 5.30pm and say 30 minutes for lunch. For this scenario, total working hours would be eight and a half hours but I need Excel to display this result as 8.30 hours (0.30 being the minutes in the half hour) and not 8.50. Can someone suggest what to do? Typically the layout would be Column A - Start Time say 8.30am Column B - Time in minutes spent at lunch say 30 minutes Column C - End Time say 5.30pm. Column D - the calculati...

Formula to calculate time
I was wondering if anybody knows of a formula to allow you to do calculations based on time. In other words, say I want to put a list of songs on a CD and their durations. Then, I want to add up the durations to get the full time of the CD, or my specific play list. So for example, using the information below: Ghostbusters - Ray Parker Jr. --- 5:23 (Just a guess) Phantom of the Opera Overture --- 3:55 (Another guess) Instead of 8:78, I'd want to see 9:18 Can this be done? Any help would be greatly appreciated. Thank you! -- Have a nice day! ~Paul Express Scripts, Charting the futu...

negative numbers #7
When trying to enter a negative number, such as -1, excel changes it to 01. samr414 Wrote: > When trying to enter a negative number, such as -1, excel changes it t > 01. I have been trying to duplicate this situation and it just would no happen. Maybe, formatting your cell to GENERAL or NUMBER will help yo solve this -- BenjieLo ----------------------------------------------------------------------- BenjieLop's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1101 View this thread: http://www.excelforum.com/showthread.php?threadid=31439 I XL does this wh...

interpolation in a particular interval (HELP)
In column A I've got a series of increasing values In column B I've got 100 values organized in such a way B1:Bmax (increasing) Bmax:B100 (floating) Below there is an example of the situation: in this particular case Bmax=B67=2997294 so I can think 2 intervals B1:B67 and B67:B100 Now, I have to to an interpolation to find the value in column A related to 0,8*Bmax, and I need to do this interpolation AFTER Bmax (in this case, after B67, in other meanings in B67:B100) Manually, to obtain the result I search, I do the following search between 2 contiguous values in the series: In C2...