How to match value with table
Solved/Closed
                                    
                        waniey                    
                                    -
                            Feb 28, 2010 at 08:43 PM
                        
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Mar 1, 2010 at 01:08 AM
        venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Mar 1, 2010 at 01:08 AM
        Related:         
- How to match value with table
 - Music match jukebox - Download - Audio playback
 - How to delete part of a table in word - Guide
 - Back alley table - Download - Adult games
 - Partial match excel - Guide
 - Windows routing table - Guide
 
2 responses
                
        
                    venkat1926
    
        
                    Posts
            
                
            1863
                
                            Registration date
            Sunday June 14, 2009
                            Status
            Contributor
                            Last seen
            August  7, 2021
            
            
                    811
    
    
                    
Mar 1, 2010 at 01:08 AM
    Mar 1, 2010 at 01:08 AM
                        
                    try this macsro on the sample sheet given previously BY NE
if it is ok use it in your file. BUT PARK THE ORIGINAL FILE SAFELY SOMEWHERE FOR RETRIEVAL.
PLEASE POST FEEDBACK.
The macro is
            if it is ok use it in your file. BUT PARK THE ORIGINAL FILE SAFELY SOMEWHERE FOR RETRIEVAL.
PLEASE POST FEEDBACK.
The macro is
Sub test()
Dim j As Double, k As Range, m As Range, r As Range
Dim z As Range, x As Range
Range("A1").CurrentRegion.Sort key1:=Columns("B:B"), header:=xlYes
Set r = Range(Range("B1"), Range("B1").End(xlDown))
Set k = Range("A1").End(xlDown).Offset(5, 0)
j = 27.78
k = "=vlookup(" & j & "," & r.Address & ",1,1)"
MsgBox k
With Columns("B:B")
Set x = Cells.Find(what:=k.Value, lookat:=xlWhole)
End With
MsgBox x.Address
If j - x.Value > x.Offset(1, 0).Value - j Then
Set z = x.Offset(1, 0)
Else
Set z = x
End If
MsgBox "the reqd value is    " & z.Offset(0, -1).Value
End Sub
                
                
                
        
                    venkat1926
    
        
                    Posts
            
                
            1863
                
                            Registration date
            Sunday June 14, 2009
                            Status
            Contributor
                            Last seen
            August  7, 2021
            
            
                    811
    
    
                    
Feb 28, 2010 at 08:59 PM
    Feb 28, 2010 at 08:59 PM
                        
                    your sheet is this 
Size(mm) 1 m/s 2 m/s 3 m/s
25 1.77 3.53 5.3
50 7.07 14.14 21.21
80 18.1 36.2 54.29
100 28.28 56.56 84.83
150 63.63 127.25 190.88
200 113.11 226.22 339.34
250 176.74 353.48 530.21
300 254.5 509 763.51
350 346.41 692.81 1,039.22
400 452.45 904.9 1,357.34
450 572.63 1,145.26 1,717.89
500 706.95 1,413.90 2,120.85
600 1,018.01 2,036.02 3,054.02
what is your "table" how is it configures.
with respect to above sheet what do you want to find?
            Size(mm) 1 m/s 2 m/s 3 m/s
25 1.77 3.53 5.3
50 7.07 14.14 21.21
80 18.1 36.2 54.29
100 28.28 56.56 84.83
150 63.63 127.25 190.88
200 113.11 226.22 339.34
250 176.74 353.48 530.21
300 254.5 509 763.51
350 346.41 692.81 1,039.22
400 452.45 904.9 1,357.34
450 572.63 1,145.26 1,717.89
500 706.95 1,413.90 2,120.85
600 1,018.01 2,036.02 3,054.02
what is your "table" how is it configures.
with respect to above sheet what do you want to find?