i want required vba Code. I am looking for a small value from the Range

sanju2323

New Member
Joined
Dec 12, 2013
Messages
17
Value Range Requirement
25.000 1750.000 17.000
17.000 1750.000 17.000
33.000 1750.000 17.000
18.000 1750.000 17.000
33.000 1750.000 17.000
47.000 1750.000 17.000
66.000 1750.000 17.000
21.000 1750.000 17.000
41.000 1750.000 17.000
98.000 3500.000 5.000
45.000 3500.000 5.000
70.000 3500.000 5.000
5.000 3500.000 5.000
53.000 3500.000 5.000
55.000 3500.000 5.000
47.000 3500.000 5.000
12.000 3500.000 5.000
15.000 5250.000 14.000
66.000 5250.000 14.000
14.000 5250.000 14.000
45.000 5250.000 14.000
68.000 5250.000 14.000
21.000 5250.000 14.000
75.000 5250.000 14.000
77.000 5250.000 14.000
89.000 5250.000 14.000
17.000 5250.000 14.000

Need VBA Codes. Ex. Test (A2,B2)
I am looking for a small value between Range
 
Last edited:

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Why can't you just use:

=MIN(IF(B:B=B2,A:A))

confirmed with Ctrl+Shift+Enter? If you want a (slow) UDF:

Code:
Function SmallIf(Rng1 As Range, Rng2 As Range)
    With ActiveSheet
        SmallIf = .Evaluate("=min(IF(" & Rng2.EntireColumn.Address & "=" & Rng2.Address & "," & Rng1.EntireColumn.Address & "))")
    End With
End Function
 
Upvote 0
Thank You Very Much Its Work.
sir, This =MIN(IF(B:B=B2,A:A)) array formula is used in large column it will be hung
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top