Ver Mensaje Individual
  #6 (permalink)  
Antiguo 11/08/2011, 09:38
Avatar de mrocf
mrocf
 
Fecha de Ingreso: marzo-2007
Ubicación: Bs.As.
Mensajes: 1.103
Antigüedad: 19 años, 6 meses
Puntos: 88
De acuerdo Excel, Buscar un numero aproximado.

Coincido, amigo jchuk.
Y, para el caso general de datos no ordenados, me parece que k.esimo.menor y buscar serían requeridos por ejemplo así:

Código PHP:
Sub BuscaMenorO_Igual()
Dim rng As Range, valor As Double, myNum As Double
On Error Resume Next
Set rng 
= Application.InputBox("Seleccione rango de búsqueda", Type:=8)
If 
rng Is Nothing Then Exit Sub
valor 
= Application.InputBox("Nº a buscar", Type:=1)
If 
valor = 0 Then Exit Sub
myNum 
= Evaluate("= LOOKUP(" & _
  WorksheetFunction
.Substitute(valor, ",", ".") & ", SMALL(" & rng.Address & _
  
", 1 + ROW(" & rng.Address & ") - ROW(" & rng(1).Address & ") ))")
rng.Find(What:=myNum, LookIn:=xlValues, LookAt:=xlWhole, SearchDirection:=xlNext).Select
End Sub 
Saludos Cacho R.